浏览代码

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

ccj 2 年之前
父节点
当前提交
13ccbffd09

+ 1492 - 1414
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -14,114 +14,157 @@
         <div class="row1">
           <div class="grid-content">
             <el-form-item label="货名">
-              <el-select v-model="selectVal" placeholder="请选择" @change="goodsChange" :disabled="!isEdit" filterable clearable ref="elSelect">
-                <el-option v-for="item in goodnameList" :key="item.id" :label="item.constValue" :value="item.constValue">
+              <el-select v-model="selectVal" placeholder="请选择" @change="goodsChange" :disabled="!isEdit" filterable
+                clearable ref="elSelect">
+                <el-option v-for="item in goodnameList" :key="item.id" :label="item.constValue"
+                  :value="item.constValue">
                 </el-option>
               </el-select>
             </el-form-item>
           </div>
-          <div class="grid-content">
+          <div class="grid-content" v-if="!isSolidFood">
             <el-form-item label="基准水分(%)">
-              <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.waterBase" @input="changeBaseWater" :disabled="!isEdit"></el-input>
+              <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.waterBase"
+                @input="changeBaseWater" :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
           <!-- <div v-if="baseInfoForm.paramType != '1'" class="grid-content"> -->
-          <div class="grid-content">
+          <div class="grid-content" v-if="!isSolidFood">
             <el-form-item label="扣重比">
-              <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.deductWeight" :disabled="!isEdit"></el-input>
+              <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.deductWeight"
+                :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
-          <div class="grid-content">
-            <el-form-item label="干粮收购价格(元/公斤)"  label-width="180px">
-              <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.dryGrainPrice" :disabled="!isEdit"></el-input>
+          <div class="grid-content" v-if="!isSolidFood">
+            <el-form-item label="干粮收购价格(元/公斤)" label-width="180px">
+              <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.dryGrainPrice"
+                :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
         </div>
         <div class="row2">
-          <div class="grid-content">
+          <div class="grid-content" v-if="!isSolidFood">
             <el-form-item label="干粮水分(%)">
-              <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.waterMin" @input="changeMinWater" :disabled="!isEdit" id="aaa"></el-input>
+              <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.waterMin" @input="changeMinWater"
+                :disabled="!isEdit" id="aaa"></el-input>
             </el-form-item>
           </div>
-          <div class="grid-content">
+          <div class="grid-content" v-if="!isSolidFood">
             <el-form-item label="水分上限(%)">
-              <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.waterMax" @input="changeMaxWater" :disabled="!isEdit"></el-input>
+              <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.waterMax" @input="changeMaxWater"
+                :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
-          <div class="grid-content">
+          <div class="grid-content" v-if="!isSolidFood">
             <el-form-item label="销售上限(吨/年)">
-              <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.saleLimit" :disabled="!isEdit"></el-input>
+              <el-input type="number" @mousewheel.native.prevent v-model="baseInfoForm.saleLimit" :disabled="!isEdit">
+              </el-input>
             </el-form-item>
           </div>
-          <div class="grid-content">
+          <div class="grid-content" v-if="!isSolidFood">
             <el-form-item label="参数类型">
-              <el-radio-group
-                @change="paramTypeChange"
-                v-model="baseInfoForm.paramType"
-                :disabled="!isEdit"
-              >
-                <el-radio label="1" >升水扣重</el-radio>
+              <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">
         <div class="top">
           <div class="title">粮价设置</div>
-          <el-button v-if="checkList.length<4" class="btn" @click="newSetPrice" :disabled="!isEdit">新增</el-button>
+          <el-button v-if="checkList.length<4&&!isSolidFood" class="btn" @click="newSetPrice" :disabled="!isEdit">新增
+          </el-button>
         </div>
-        <div class="content" v-for="(item,index) in priceList" :key="index">
-          <div class="top">
-            <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 v-if="!isSolidFood">
+          <div class="content" v-for="(item,index) in priceList" :key="index">
+            <div class="top">
+              <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>
-            <el-button @click="delSetPrice(item,index)" :disabled="!isEdit">删除</el-button>
-          </div>
-          <div class="level">
-            <el-checkbox-group v-model="item.checkList" @change="changeLevel($event,index)">
-              <el-checkbox label="一等" :disabled="!isEdit"></el-checkbox>
-              <el-checkbox label="二等" :disabled="!isEdit"></el-checkbox>
-              <el-checkbox label="三等" :disabled="!isEdit"></el-checkbox>
-              <el-checkbox label="等外" :disabled="!isEdit"></el-checkbox>
-            </el-checkbox-group>
-          </div>
-          <div class="count">
-            <div class="left">
-              <div>水分(%)</div>
-              <div v-if="baseInfoForm.paramType == '2'">降幅(元/0.1%)</div>
-              <div v-else>扣重比</div>
+            <div class="level">
+              <el-checkbox-group v-model="item.checkList" @change="changeLevel($event,index)">
+                <el-checkbox label="一等" :disabled="!isEdit"></el-checkbox>
+                <el-checkbox label="二等" :disabled="!isEdit"></el-checkbox>
+                <el-checkbox label="三等" :disabled="!isEdit"></el-checkbox>
+                <el-checkbox label="等外" :disabled="!isEdit"></el-checkbox>
+              </el-checkbox-group>
             </div>
-            <div class="right">
-              <div class="line"></div>
-              <div class="jt-style"></div>
-
-              <div v-for="(item1,index) in item.detailList">
-                <div class="item-style">
-                  <div v-if="item1.type!=4" class="item-style-title">
-                    <span>{{item1.name}}{{item1.index}}</span>
-                    <el-button class="add" @click="add(item,item1,index)" v-if="item1.type!=3" :disabled="!isEdit">+
-                    </el-button>
-                    <el-button class="reduce" @click="reduce(item,item1,index)"
-                      v-show="item1.type!=1&&item1.type!=2&&item1.type!=3" :disabled="!isEdit">-</el-button>
+            <div class="count">
+              <div class="left">
+                <div>水分(%)</div>
+                <div v-if="baseInfoForm.paramType == '2'">降幅(元/0.1%)</div>
+                <div v-else>扣重比</div>
+              </div>
+              <div class="right">
+                <div class="line"></div>
+                <div class="jt-style"></div>
+                <div v-for="(item1,index) in item.detailList">
+                  <div class="item-style">
+                    <div v-if="item1.type!=4" class="item-style-title">
+                      <span>{{item1.name}}{{item1.index}}</span>
+                      <el-button class="add" @click="add(item,item1,index)" v-if="item1.type!=3" :disabled="!isEdit">+
+                      </el-button>
+                      <el-button class="reduce" @click="reduce(item,item1,index)"
+                        v-show="item1.type!=1&&item1.type!=2&&item1.type!=3" :disabled="!isEdit">-</el-button>
+                    </div>
+                    <div v-show="item1.type!=4">
+                      <input v-if='item1.type==1' class="water-price" :class="item1.isWrite?'white-bgc':''"
+                        v-model="baseInfoForm.waterMin" :disabled="item1.isWrite?false:true"></input>
+                      <input v-if='item1.type==2' class="water-price" :class="item1.isWrite?'white-bgc':''"
+                        v-model="baseInfoForm.waterBase" :disabled="item1.isWrite?false:true"></input>
+                      <input v-if='item1.type==3' class="water-price" :class="item1.isWrite?'white-bgc':''"
+                        v-model="baseInfoForm.waterMax" :disabled="item1.isWrite?false:true"></input>
+                      <input v-if='item1.type==5' class="water-price" :class="item1.isWrite?'white-bgc':''"
+                        v-model="item1.water" :disabled="isEdit?false:true"></input>
+                    </div>
+                    <div class="circle" v-if="item1.type!=4"></div>
                   </div>
-                  <div v-show="item1.type!=4">
-                    <input v-if='item1.type==1' class="water-price"  :class="item1.isWrite?'white-bgc':''" v-model="baseInfoForm.waterMin"
-                      :disabled="item1.isWrite?false:true"></input>
-                    <input v-if='item1.type==2' class="water-price"  :class="item1.isWrite?'white-bgc':''" v-model="baseInfoForm.waterBase"
-                      :disabled="item1.isWrite?false:true"></input>
-                    <input v-if='item1.type==3' class="water-price"  :class="item1.isWrite?'white-bgc':''" v-model="baseInfoForm.waterMax"
-                      :disabled="item1.isWrite?false:true"></input>
-                    <input v-if='item1.type==5' class="water-price"  :class="item1.isWrite?'white-bgc':''" v-model="item1.water"
-                      :disabled="isEdit?false:true"></input>
+                  <div class="bottom-price">
+                    <input v-if="item1.type==4" class="water-price" :class="isEdit?'white-bgc':''"
+                      v-model="item1.jfprice" :disabled="!isEdit"></input>
                   </div>
-                  <div class="circle" v-if="item1.type!=4"></div>
                 </div>
-                <div class="bottom-price">
-                  <input v-if="item1.type==4" class="water-price" :class="isEdit?'white-bgc':''" v-model="item1.jfprice" :disabled="!isEdit"></input>
+              </div>
+            </div>
+          </div>
+        </div>
+        <!------------------------------------- 玉米容重 ---------------------------------------------------->
+        <div v-else>
+          <div class="content">
+            <div class="count">
+              <div class="left" style="align-items: center;justify-content: flex-end;">
+                <div>容重(g/L)</div>
+                <div>价格(元/公斤)</div>
+              </div>
+              <div class="right">
+                <div class="line"></div>
+                <div class="jt-style"></div>
+                <div v-for="(item1,index) in priceRZObj.detailList">
+                  <div class="item-style">
+                    <div v-if="item1.type!=4" class="item-style-title">
+                      <span>{{item1.name}}</span>
+                      <el-button class="add" @click="addRZ(item1,index)" v-if="item1.type!=3" :disabled="!isEdit">+
+                      </el-button>
+                      <el-button class="reduce" @click="reduceRZ(item1,index)"
+                        v-show="item1.type!=1&&priceRZObj.detailList.length>2" :disabled="!isEdit">-</el-button>
+                    </div>
+                    <div v-show="item1.type!=4">
+                      <input class="water-price" :class="item1.isWrite?'white-bgc':''"
+                        v-model="item1.water"></input>
+                    </div>
+                    <div class="circle" v-if="item1.type!=4"></div>
+                  </div>
+                  <div class="bottom-price">
+                    <input v-if="item1.type==4" class="water-price" :class="isEdit?'white-bgc':''"
+                      v-model="item1.jfprice" :disabled="!isEdit"></input>
+                  </div>
                 </div>
               </div>
             </div>
@@ -161,70 +204,162 @@
   </el-container>
 </template>
 <script>
-  import {
-    purchasePriceAdd,
-    purchasePriceLook,
-    purchasePriceEdit
-  } from '@/model/houseSelfCollect/index'
-  import {
-    packList,
-  } from '@/model/contarct/index'
-  import {
-    posthandle
-  } from '@/model/purchasingManagement/index'
-  export default {
-
-    components: {
-
-    },
-    watch: {
+import {
+  purchasePriceAdd,
+  purchasePriceLook,
+  purchasePriceEdit
+} from '@/model/houseSelfCollect/index'
+import {
+  packList,
+} from '@/model/contarct/index'
+import {
+  posthandle
+} from '@/model/purchasingManagement/index'
+export default {
+
+  components: {
+
+  },
+  watch: {
+
+  },
+  data() {
+    return {
+      isSolidFood: true,
+      isShowTip: false,
+      price: 0,
+      left: [],
+      right: [],
+      selectVal: '',
+      goodnameList: [],
+      tableData: [],
+      submitName: '提交',
+      isCountShow: true,
+      priceRZObj: {
+        index: 0,
+        checkList: [],
+        basicUnitPrice: '',
+        detailList: [ {
+          type: 4,
+          jfprice: ''
+        },{
+          type: 1,
+          name: '容重',
+          water: '',
+          isWrite: true
+        }
+        ],
+      },
+      priceList: [{
+        index: 0,
+        checkList: [],
+        basicUnitPrice: '',
+        detailList: [{
+          type: 1,
+          name: '干粮',
+          water: '',
+          isWrite: false
+        },
+        {
+          type: 4,
+          jfprice: ''
+        },
+        {
+          type: 2,
+          name: '基准',
+          water: '',
+          isWrite: false
+        },
+        {
+          type: 4,
+          jfprice: ''
+        },
+        {
+          type: 3,
+          name: '上限',
+          water: '',
+          isWrite: false
+        },
+        ],
+      }],
+      splitPriceList: [],
+      baseInfoForm: {
+        warehouseId: '',
+        warehouseName: '',
+        compId: '',
+        goodsNameKey: '',
+        goodsName: '',
+        waterBase: '',
+        deductWeight: '',
+        waterMin: '',
+        waterMax: '',
+        saleLimit: '',
+        statusFlag: '',
+        status: '',
+        workflowId: '',
+        approveStatus: '',
+        passDate: '',
+        dryGrainPrice: '',
+        details: [],
+        detailPrints: []
+      },
+      index: 0,
+      type: '',
+      isEdit: true,
+      isSHowNewBtn: true,
+      checkList: [],
+      checkList1: [],
+      checkList2: [],
+      checkList3: [],
+      checkList4: []
+    }
+  },
+
+  activated() {
+    // 货名
+    let _goodsNameList = []
+    _goodsNameList = this.$route.query.goodsNameList
+    if (_goodsNameList == undefined) {
+      _goodsNameList = []
+    }
+    packList({
+      constId: 'CON2'
+    })
+      .toPromise()
+      .then((response) => {
+        let _list = []
+        for (let i = 0; i < response.length; i++) {
+          let _isAll = true
+          for (let j = 0; j < _goodsNameList.length; j++) {
+            if (response[i].constValue != _goodsNameList[j]) {
+              if (j == _goodsNameList.length - 1 && _isAll) {
+                _list.push(response[i])
+              }
+            } else {
+              _isAll = false
+            }
+          }
+        }
+        if (_goodsNameList.length == 0) {
+          this.goodnameList = response
+          this.selectVal = response[0].constValue
+          this.baseInfoForm.goodsNameKey = response[0].constKey
+        } else {
+          this.goodnameList = _list
+          if (_list.length != 0) {
+            this.selectVal = _list[0].constValue
+            this.baseInfoForm.goodsNameKey = _list[0].constKey
+          }
+        }
+      })
+    this.isCountShow = true
 
-    },
-    data() {
-      return {
-        isShowTip:false,
-        price: 0,
-        left: [],
-        right: [],
-        selectVal: '',
-        goodnameList: [],
-        tableData: [],
-        submitName: '提交',
-        isCountShow: true,
-        priceList: [{
-          index: 0,
-          checkList: [],
-          basicUnitPrice: '',
-          detailList: [{
-              type: 1,
-              name: '干粮',
-              water: '',
-              isWrite: false
-            },
-            {
-              type: 4,
-              jfprice: ''
-            },
-            {
-              type: 2,
-              name: '基准',
-              water: '',
-              isWrite: false
-            },
-            {
-              type: 4,
-              jfprice: ''
-            },
-            {
-              type: 3,
-              name: '上限',
-              water: '',
-              isWrite: false
-            },
-          ],
-        }],
-        splitPriceList: [],
-        baseInfoForm: {
+    switch (this.$route.query.type) {
+      case '新增':
+        this.submitName = '提交'
+        this.isCountShow = true
+        this.checkList = []
+        this.baseInfoForm = {
           warehouseId: '',
           warehouseName: '',
           compId: '',
@@ -234,7 +369,7 @@
           deductWeight: '',
           waterMin: '',
           waterMax: '',
-          saleLimit: '',
+          saleLimit: 2000,
           statusFlag: '',
           status: '',
           workflowId: '',
@@ -242,1433 +377,1376 @@
           passDate: '',
           dryGrainPrice: '',
           details: [],
-          detailPrints: []
-        },
-        index: 0,
-        type: '',
-        isEdit: true,
-        isSHowNewBtn: true,
-        checkList: [],
-        checkList1: [],
-        checkList2: [],
-        checkList3: [],
-        checkList4: []
-      }
-    },
+          detailPrints: [],
+          paramType: '1'
+        }
+        this.baseInfoForm.warehouseId = this.$route.query.warehouseId
+        this.baseInfoForm.warehouseName = this.$route.query.warehouseName
+        this.baseInfoForm.compId = this.$route.query.compId
+        this.type = this.$route.query.type
 
-    activated() {
-      // 货名
-      let _goodsNameList = []
-      _goodsNameList = this.$route.query.goodsNameList
-      if (_goodsNameList == undefined) {
-        _goodsNameList = []
-      }
-      packList({
-          constId: 'CON2'
-        })
-        .toPromise()
-        .then((response) => {
-          let _list = []
-          for (let i = 0; i < response.length; i++) {
-            let _isAll = true
-            for (let j = 0; j < _goodsNameList.length; j++) {
-              if (response[i].constValue != _goodsNameList[j]) {
-                if (j == _goodsNameList.length - 1 && _isAll) {
-                  _list.push(response[i])
-                }
-              } else {
-                _isAll = false
-              }
-            }
-          }
-          if (_goodsNameList.length == 0) {
-            this.goodnameList = response
-            this.selectVal = response[0].constValue
-            this.baseInfoForm.goodsNameKey = response[0].constKey
-          } else {
-            this.goodnameList = _list
-            if (_list.length != 0) {
-              this.selectVal = _list[0].constValue
-              this.baseInfoForm.goodsNameKey = _list[0].constKey
-            }
-          }
-        })
-      this.isCountShow = true
-     
-      switch (this.$route.query.type) {
-        case '新增':
-          this.submitName = '提交'
-          this.isCountShow = true
-          this.checkList=[]
-          this.baseInfoForm = {
-            warehouseId: '',
-            warehouseName: '',
-            compId: '',
-            goodsNameKey: '',
-            goodsName: '',
-            waterBase: '',
-            deductWeight: '',
-            waterMin: '',
-            waterMax: '',
-            saleLimit: 2000,
-            statusFlag: '',
-            status: '',
-            workflowId: '',
-            approveStatus: '',
-            passDate: '',
-            dryGrainPrice: '',
-            details: [],
-            detailPrints: [],
-            paramType:'1'
+        this.priceList[0].detailList[0].water = this.baseInfoForm.waterMin
+        this.priceList[0].detailList[2].water = this.baseInfoForm.waterBase
+        this.priceList[0].detailList[4].water = this.baseInfoForm.waterMax
+        this.isEdit = true
+        this.priceList = [{
+          index: 0,
+          checkList: [],
+          basicUnitPrice: '',
+          detailList: [{
+            type: 1,
+            name: '干粮',
+            water: '',
+            isWrite: false
+          },
+          {
+            type: 4,
+            jfprice: ''
+          },
+          {
+            type: 2,
+            name: '基准',
+            water: '',
+            isWrite: false
+          },
+          {
+            type: 4,
+            jfprice: ''
+          },
+          {
+            type: 3,
+            name: '上限',
+            water: '',
+            isWrite: false
+          },
+          ],
+        }]
+        break;
+      case '编辑':
+        this.isEdit = true;
+        this.submitName = '提交'
+        this.getData()
+        break;
+      case '审核中':
+        this.isEdit = true;
+        this.submitName = '通过'
+        this.getData()
+        break;
+      case '查看':
+        this.isEdit = false;
+        this.submitName = '计算'
+        this.getData()
+        break;
+      default:
+        break
+    }
+  },
+  mounted() {
+    if (window.history && window.history.pushState) {
+      history.pushState(null, null, document.URL);
+      window.addEventListener('popstate', this.onCloseGoodSelect, false);
+    }
+  },
+  methods: {
+    onCloseGoodSelect() {
+      this.$refs.elSelect.blur()
+    },
+    paramTypeChange(e) {
+      // this.makeTableList()
+    },
+    // 查看/编辑获取数据
+    getData() {
+      this.type = this.$route.query.type
+      this.baseInfoForm = JSON.parse(this.$route.query.data)
+      purchasePriceLook({
+        id: this.baseInfoForm.id
+      }).toPromise().then((response) => {
+        this.baseInfoForm = response
+        //构造查看priceList数据
+        this.priceList = []
+        this.makeLookPriceList()
+        if (this.$route.query.type != '新增') {
+          let _data = this.priceList
+          this.checkList1 = []
+          this.checkList2 = []
+          this.checkList3 = []
+          this.checkList4 = []
+          for (let i = 0; i < _data.length; i++) {
+            if (i == 0) this.checkList1 = _data[i].checkList
+            if (i == 1) this.checkList2 = _data[i].checkList
+            if (i == 2) this.checkList3 = _data[i].checkList
+            if (i == 3) this.checkList4 = _data[i].checkList
           }
-          this.baseInfoForm.warehouseId = this.$route.query.warehouseId
-          this.baseInfoForm.warehouseName = this.$route.query.warehouseName
-          this.baseInfoForm.compId = this.$route.query.compId
-          this.type = this.$route.query.type
-
-          this.priceList[0].detailList[0].water = this.baseInfoForm.waterMin
-          this.priceList[0].detailList[2].water = this.baseInfoForm.waterBase
-          this.priceList[0].detailList[4].water = this.baseInfoForm.waterMax
-          this.isEdit = true
-          this.priceList = [{
-            index: 0,
-            checkList: [],
-            basicUnitPrice: '',
-            detailList: [{
-                type: 1,
-                name: '干粮',
-                water: '',
-                isWrite: false
-              },
-              {
-                type: 4,
-                jfprice: ''
-              },
-              {
-                type: 2,
-                name: '基准',
-                water: '',
-                isWrite: false
-              },
-              {
-                type: 4,
-                jfprice: ''
-              },
-              {
-                type: 3,
-                name: '上限',
-                water: '',
-                isWrite: false
-              },
-            ],
-          }]
-          break;
-        case '编辑':
-          this.isEdit = true;
-          this.submitName = '提交'
-          this.getData()
-          break;
-        case '审核中':
-          this.isEdit = true;
-          this.submitName = '通过'
-          this.getData()
-          break;
-        case '查看':
-          this.isEdit = false;
-          this.submitName = '计算'
-          this.getData()
-          break;
-        default:
+          this.checkList = [...new Set([...this.checkList1, ...this.checkList2, ...this.checkList3, ...this.checkList4])]
+        }
+      })
+    },
+    goodsChange(e) {
+      for (let num = 0; num < this.goodnameList.length; num++) {
+        if (e == this.goodnameList[num].constValue) {
+          this.baseInfoForm.goodsNameKey = this.goodnameList[num].constKey
           break
+        }
       }
     },
-    mounted() {
-         if (window.history && window.history.pushState) {
-             history.pushState(null, null, document.URL);
-             window.addEventListener("popstate", this.onCloseGoodSelect, false);
-         }
-     },
-    methods: {
-      onCloseGoodSelect(){
-        this.$refs.elSelect.blur()
-      },
-      paramTypeChange(e){
-        // this.makeTableList()
-      },
-      // 查看/编辑获取数据
-      getData() {
-        this.type = this.$route.query.type
-        this.baseInfoForm = JSON.parse(this.$route.query.data)
-        purchasePriceLook({
-          id: this.baseInfoForm.id
-        }).toPromise().then((response) => {
-          this.baseInfoForm = response
-          //构造查看priceList数据
-          this.priceList = []
-          this.makeLookPriceList()
-          if(this.$route.query.type != '新增'){
-               let _data = this.priceList
-              this.checkList1 = []
-              this.checkList2 = []
-              this.checkList3 = []
-              this.checkList4 = []
-              for (let i = 0; i < _data.length; i++) {
-                if (i == 0) this.checkList1 = _data[i].checkList
-                if (i == 1) this.checkList2 = _data[i].checkList
-                if (i == 2) this.checkList3 = _data[i].checkList
-                if (i == 3) this.checkList4 = _data[i].checkList
-              }
-               this.checkList = [...new Set([...this.checkList1, ...this.checkList2, ...this.checkList3, ...this.checkList4])]
-          }
-        })
-      },
-      goodsChange(e) {
-        for(let num = 0 ; num < this.goodnameList.length ; num++){
-          if(e == this.goodnameList[num].constValue){
-             this.baseInfoForm.goodsNameKey = this.goodnameList[num].constKey
-             break  
+    changeBaseWater(val) {
+      for (let i = 0; i < this.priceList.length; i++) {
+        for (let k = 0; k < this.priceList[i].detailList.length; k++) {
+          if (this.priceList[i].detailList[k].type == 2) {
+            this.priceList[i].detailList[k].water = val
           }
         }
-      },
-      changeBaseWater(val) {
-        for (let i = 0; i < this.priceList.length; i++) {
-          for (let k = 0; k < this.priceList[i].detailList.length; k++) {
-            if (this.priceList[i].detailList[k].type == 2) {
-              this.priceList[i].detailList[k].water = val
-            }
+      }
+    },
+    changeMinWater(val) {
+      for (let i = 0; i < this.priceList.length; i++) {
+        for (let k = 0; k < this.priceList[i].detailList.length; k++) {
+          if (this.priceList[i].detailList[k].type == 1) {
+            this.priceList[i].detailList[k].water = val
           }
         }
-      },
-      changeMinWater(val) {
-        for (let i = 0; i < this.priceList.length; i++) {
-          for (let k = 0; k < this.priceList[i].detailList.length; k++) {
-            if (this.priceList[i].detailList[k].type == 1) {
-              this.priceList[i].detailList[k].water = val
-            }
+      }
+    },
+    changeMaxWater(val) {
+      for (let i = 0; i < this.priceList.length; i++) {
+        for (let k = 0; k < this.priceList[i].detailList.length; k++) {
+          if (this.priceList[i].detailList[k].type == 3) {
+            this.priceList[i].detailList[k].water = val
           }
         }
-      },
-      changeMaxWater(val) {
-        for (let i = 0; i < this.priceList.length; i++) {
-          for (let k = 0; k < this.priceList[i].detailList.length; k++) {
-            if (this.priceList[i].detailList[k].type == 3) {
-              this.priceList[i].detailList[k].water = val
+      }
+    },
+    // 设置表格颜色
+    tableRowClassName({
+      row,
+      rowIndex
+    }) {
+      if ((rowIndex + 1) % 2 === 0) {
+        return 'double';
+      } else {
+        return 'single';
+      }
+    },
+    getRowClass({
+      rowIndex
+    }) {
+      if (rowIndex == 0) {
+        return 'background:#ebeaef'
+      } else {
+        return ''
+      }
+      //   return '';
+    },
+    addRZ(item1, index) {debugger
+        this.priceRZObj.detailList.splice(index + 1, 0, {
+          name: '容重',
+          water: '',
+          type: 5,
+          isWrite: true
+        });
+        this.priceRZObj.detailList.splice(index + 1, 0, {
+          jfprice: '',
+          type: 4
+        });
+        // this.makeSpliceIndex(item, item1, index)
+      
+    },
+      reduceRZ(index) {
+        debugger
+      this.priceRZObj.detailList.splice(index-1, 2);
+    },
+    // 增加分界
+    add(item, item1, index) {
+      // let _data = this.detailList;
+      if (item.index > 2) {
+        this.$message({
+          message: '最多插入3个分界值',
+          type: 'warning'
+        });
+      } else {
+        item.index++
+        item.detailList.splice(index + 1, 0, {
+          name: '分界',
+          water: '',
+          type: 5,
+          index: 1,
+          isWrite: true
+        });
+        item.detailList.splice(index + 1, 0, {
+          jfprice: '',
+          type: 4
+        });
+        this.makeSpliceIndex(item, item1, index)
+      }
+    },
+    // 减少分界
+    reduce(item, item1, index) {
+      item.index--
+      item.detailList.splice(index, 2);
+    },
+    // 设置分界索引排序
+    makeSpliceIndex(item, item1) {
+      let _index = 0
+      for (let j = 0; j < item.detailList.length; j++) {
+        if (item.detailList[j].type == 5) {
+          _index++
+          item.detailList[j].index = _index;
+        }
+      }
+    },
+    // 复选框变化监听
+    changeLevel(val, index) {
+      let _data = this.priceList
+
+      this.checkList1 = []
+      this.checkList2 = []
+      this.checkList3 = []
+      this.checkList4 = []
+      for (let i = 0; i < _data.length; i++) {
+        let _childData = _data[i].checkList
+        for (let k = 0; k < _childData.length; k++) {
+          for (let j = 0; j < val.length; j++) {
+            if (val[j] == _childData[k] && i != index) {
+              _childData.splice(k, 1)
             }
           }
         }
-      },
-      // 设置表格颜色
-      tableRowClassName({
-        row,
-        rowIndex
-      }) {
-        if ((rowIndex + 1) % 2 === 0) {
-          return 'double';
-        } else {
-          return 'single';
-        }
-      },
-      getRowClass({
-        rowIndex
-      }) {
-        if (rowIndex == 0) {
-          return 'background:#ebeaef'
-        } else {
-          return ''
-        }
-        //   return '';
-      },
-      // 增加分界
-      add(item, item1, index) {
-        // let _data = this.detailList;
-        if (item.index > 2) {
-          this.$message({
-            message: '最多插入3个分界值',
-            type: 'warning'
-          });
-        } else {
-          item.index++
-          item.detailList.splice(index + 1, 0, {
-            name: '分界',
-            water: '',
-            type: 5,
-            index: 1,
-            isWrite: true
-          });
-          item.detailList.splice(index + 1, 0, {
-            jfprice: '',
-            type: 4
-          });
-          this.makeSpliceIndex(item, item1, index)
-        }
-      },
-      // 减少分界
-      reduce(item, item1, index) {
-        item.index--
-        item.detailList.splice(index, 2);
-      },
-      // 设置分界索引排序
-      makeSpliceIndex(item, item1) {
-        let _index = 0
-        for (let j = 0; j < item.detailList.length; j++) {
-          if (item.detailList[j].type == 5) {
-            _index++
-            item.detailList[j].index = _index;
+        if (i == 0) this.checkList1 = _data[i].checkList
+        if (i == 1) this.checkList2 = _data[i].checkList
+        if (i == 2) this.checkList3 = _data[i].checkList
+        if (i == 3) this.checkList4 = _data[i].checkList
+      }
+      this.checkList = [...new Set([...this.checkList1, ...this.checkList2, ...this.checkList3, ...this.checkList4])]
+    },
+    // 算价格纠正精度不准
+    accMul(arg1, arg2) {
+      var m = 0,
+        s1 = arg1.toString(),
+        s2 = arg2.toString();
+      try {
+        m += s1.split('.')[1].length
+      } catch (e) { }
+      try {
+        m += s2.split('.')[1].length
+      } catch (e) { }
+      return Number(s1.replace('.', '')) * Number(s2.replace('.', '')) / Math.pow(10, m)
+    },
+    //保留两位小数
+    keepTwoDecimal(num) {
+      var result = parseFloat(num);
+      if (isNaN(result)) {
+        return false;
+      }
+      result = Math.round(result * 10000) / 10000;
+      return result;
+    },
+    //保留两位小数
+    keepOneDecimal(num) {
+      var result = parseFloat(num);
+      if (isNaN(result)) {
+        return false;
+      }
+      result = Math.round(result * 100) / 100;
+      return result;
+    },
+    // 添加粮价设置
+    newSetPrice() {
+      let _newObj = {
+        index: 0,
+        checkList: [],
+        detailList: [{
+          type: 1,
+          name: '干粮',
+          water: this.baseInfoForm.waterMin,
+          isWrite: false
+        },
+        {
+          type: 4,
+          jfprice: ''
+        },
+        {
+          type: 2,
+          name: '基准',
+          water: this.baseInfoForm.waterBase,
+          isWrite: false
+        },
+        {
+          type: 4,
+          jfprice: ''
+        },
+        {
+          type: 3,
+          name: '上限',
+          water: this.baseInfoForm.waterMax,
+          isWrite: false
+        },
+        ],
+      }
+      this.priceList.push(_newObj)
+    },
+    // 删除价格组
+    delSetPrice(item, index) {
+      let that = this
+      this.checkList1 = []
+      this.checkList2 = []
+      this.checkList3 = []
+      this.checkList4 = []
+      for (let i = 0; i < item.checkList.length; i++) {
+        for (let j = 0; j < this.checkList.length; j++) {
+          if (item.checkList[i] == this.checkList[j]) {
+            this.checkList.splice(j, 1)
           }
         }
-      },
-      // 复选框变化监听
-      changeLevel(val, index) {
-        let _data = this.priceList
-        
-        this.checkList1 = []
-        this.checkList2 = []
-        this.checkList3 = []
-        this.checkList4 = []
-        for (let i = 0; i < _data.length; i++) {
-          let _childData = _data[i].checkList
-          for (let k = 0; k < _childData.length; k++) {
-            for (let j = 0; j < val.length; j++) {
-              if (val[j] == _childData[k] && i != index) {
-                _childData.splice(k, 1)
-              }
-            }
+      }
+      this.$confirm(
+        '确认删除本组设置?',
+        '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }
+      )
+        .then(() => {
+          if (that.priceList.length == 1) {
+            that.$message({
+              message: '至少保留一组粮价设置',
+              type: 'warning'
+            });
+          } else {
+            that.priceList.splice(index, 1)
+            that.baseInfoForm.details.split(index, 1)
           }
-          if (i == 0) this.checkList1 = _data[i].checkList
-          if (i == 1) this.checkList2 = _data[i].checkList
-          if (i == 2) this.checkList3 = _data[i].checkList
-          if (i == 3) this.checkList4 = _data[i].checkList
-        }
-        this.checkList = [...new Set([...this.checkList1, ...this.checkList2, ...this.checkList3, ...this.checkList4])]
-      },
-      // 算价格纠正精度不准
-      accMul(arg1, arg2) {
-        var m = 0,
-          s1 = arg1.toString(),
-          s2 = arg2.toString();
-        try {
-          m += s1.split('.')[1].length
-        } catch (e) {}
-        try {
-          m += s2.split('.')[1].length
-        } catch (e) {}
-        return Number(s1.replace('.', '')) * Number(s2.replace('.', '')) / Math.pow(10, m)
-      },
-      //保留两位小数
-      keepTwoDecimal(num) {
-        var result = parseFloat(num);
-        if (isNaN(result)) {
-          return false;
-        }
-        result = Math.round(result * 10000) / 10000;
-        return result;
-      },
-      //保留两位小数
-      keepOneDecimal(num) {
-        var result = parseFloat(num);
-        if (isNaN(result)) {
-          return false;
-        }
-        result = Math.round(result * 100) / 100;
-        return result;
-      },
-      // 添加粮价设置
-      newSetPrice() {
-        let _newObj = {
-          index: 0,
-          checkList: [],
-          detailList: [{
-              type: 1,
-              name: '干粮',
-              water: this.baseInfoForm.waterMin,
-              isWrite: false
-            },
-            {
-              type: 4,
-              jfprice: ''
-            },
-            {
-              type: 2,
-              name: '基准',
-              water: this.baseInfoForm.waterBase,
-              isWrite: false
-            },
-            {
-              type: 4,
-              jfprice: ''
-            },
-            {
-              type: 3,
-              name: '上限',
-              water: this.baseInfoForm.waterMax,
-              isWrite: false
-            },
-          ],
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    //构造新增价格数据
+    makePriceDataList() {
+      for (let k = 0; k < this.priceList.length; k++) {
+        // 新增
+        let _detailsObj = {
+          compId: this.baseInfoForm.warehouseId,
+          basePrice: this.priceList[k].basicUnitPrice,
+          level: '',
+          point: '',
+          pointPrice: ''
         }
-        this.priceList.push(_newObj)
-      },
-      // 删除价格组
-      delSetPrice(item, index) {
-        let that = this
-        this.checkList1 = []
-        this.checkList2 = []
-        this.checkList3 = []
-        this.checkList4 = []
-        for (let i = 0; i < item.checkList.length; i++) {
-          for (let j = 0; j < this.checkList.length; j++) {
-            if (item.checkList[i] == this.checkList[j]) {
-              this.checkList.splice(j, 1)
-            }
+        for (let j = 0; j < this.priceList[k].checkList.length; j++) {
+          if (j == 0) {
+            _detailsObj.level += this.priceList[k].checkList[j]
+          } else {
+            _detailsObj.level += ',' + this.priceList[k].checkList[j]
           }
         }
-        this.$confirm(
-            '确认删除本组设置?',
-            '提示', {
-              confirmButtonText: '确定',
-              cancelButtonText: '取消',
-              type: 'warning',
-            }
-          )
-          .then(() => {
-            if (that.priceList.length == 1) {
-              that.$message({
-                message: '至少保留一组粮价设置',
-                type: 'warning'
-              });
-            } else {
-              that.priceList.splice(index, 1)
-              that.baseInfoForm.details.split(index, 1)
-            }
-          })
-          .catch(() => {
-            return false
-          })
-      },
-      //构造新增价格数据
-      makePriceDataList() {
-        for (let k = 0; k < this.priceList.length; k++) {
-          // 新增
-          let _detailsObj = {
-            compId: this.baseInfoForm.warehouseId,
-            basePrice: this.priceList[k].basicUnitPrice,
-            level: '',
-            point: '',
-            pointPrice: ''
-          }
-          for (let j = 0; j < this.priceList[k].checkList.length; j++) {
-            if (j == 0) {
-              _detailsObj.level += this.priceList[k].checkList[j]
-            } else {
-              _detailsObj.level += ',' + this.priceList[k].checkList[j]
-            }
-          }
-          let _index = 0
-          let _index1 = 0
-          for (let i = 0; i < this.priceList[k].detailList.length; i++) {
-            if (this.priceList[k].detailList[i].type == 4) {
-              if (_index == 0) {
-                _index++
-                _detailsObj.pointPrice += this.priceList[k].detailList[i].jfprice
+        let _index = 0
+        let _index1 = 0
+        for (let i = 0; i < this.priceList[k].detailList.length; i++) {
+          if (this.priceList[k].detailList[i].type == 4) {
+            if (_index == 0) {
+              _index++
+              _detailsObj.pointPrice += this.priceList[k].detailList[i].jfprice
 
-              } else {
-                _detailsObj.pointPrice += ',' + this.priceList[k].detailList[i].jfprice
-              }
-            } else if (_index1 == 0) {
-              _index1++
-              _detailsObj.point += this.priceList[k].detailList[i].water
             } else {
-              _detailsObj.point += ',' + this.priceList[k].detailList[i].water
+              _detailsObj.pointPrice += ',' + this.priceList[k].detailList[i].jfprice
             }
+          } else if (_index1 == 0) {
+            _index1++
+            _detailsObj.point += this.priceList[k].detailList[i].water
+          } else {
+            _detailsObj.point += ',' + this.priceList[k].detailList[i].water
           }
-          this.baseInfoForm.details.push(_detailsObj)
-
         }
-      },
-      //打印
-      print() {
-        localStorage.setItem('pricePrintList', JSON.stringify(this.baseInfoForm.detailPrints));
-        window.open('../../../static/print.html?name=' + this.baseInfoForm.goodsName)
-      },
-      validate() {
-        let that = this
-
-        function _baseWaterValidate(min, max, saveNum, point, type, inputVal) {
-          console.log(min, max, saveNum, point, type, inputVal)
-          let _val1 = inputVal
-          let _pointVal1 = _val1.toString().split('.')[1]
-          if (_pointVal1 == undefined) _pointVal1 = 0
-          if (typeof(_pointVal1) == 'string') _pointVal1 = _pointVal1.length
-          let _tobeVal1 = _val1 % point
-          if (type == 'waterBase') {
-            if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum ) {
-              return false
-            }
-          }
-          if (type == 'deductWeight') {
-            if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum) {
-              return false
-            }
-          }
-          if (type == 'saleLimit') {
-            if (_val1 <= max && _val1 >= min) {
-              // Number.isInteger(that.baseInfoForm.saleLimit)
-              return false
-            }
+        this.baseInfoForm.details.push(_detailsObj)
+
+      }
+    },
+    //打印
+    print() {
+      localStorage.setItem('pricePrintList', JSON.stringify(this.baseInfoForm.detailPrints));
+      window.open('../../../static/print.html?name=' + this.baseInfoForm.goodsName)
+    },
+    validate() {
+      let that = this
+
+      function _baseWaterValidate(min, max, saveNum, point, type, inputVal) {
+        console.log(min, max, saveNum, point, type, inputVal)
+        let _val1 = inputVal
+        let _pointVal1 = _val1.toString().split('.')[1]
+        if (_pointVal1 == undefined) _pointVal1 = 0
+        if (typeof (_pointVal1) == 'string') _pointVal1 = _pointVal1.length
+        let _tobeVal1 = _val1 % point
+        if (type == 'waterBase') {
+          if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum) {
+            return false
           }
-          return true
         }
-        if (this.baseInfoForm.waterBase == '' || _baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this
-            .baseInfoForm.waterBase))) {
-          if (_baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this.baseInfoForm.waterBase))) {
-            that.$message.error('水分基准输入错误,最多保留1位小数,基准水分须可被0.1整除!');
-          } else {
-            this.$message.error('基准水分不能为空!');
+        if (type == 'deductWeight') {
+          if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum) {
+            return false
           }
-          return false
         }
-        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('扣重比不能为空!');
-            }
+        if (type == 'saleLimit') {
+          if (_val1 <= max && _val1 >= min) {
+            // Number.isInteger(that.baseInfoForm.saleLimit)
             return false
           }
         }
-        if (this.baseInfoForm.dryGrainPrice == '' || _baseWaterValidate(0, 1000, 4, '', 'deductWeight', parseFloat(this
-            .baseInfoForm.dryGrainPrice))) {
-          if (_baseWaterValidate(0, 1000, 4, '', 'deductWeight', parseFloat(this.baseInfoForm.dryGrainPrice))) {
-            that.$message.error('干粮收购价输入错误!');
+        return true
+      }
+      if (this.baseInfoForm.waterBase == '' || _baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this
+        .baseInfoForm.waterBase))) {
+        if (_baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this.baseInfoForm.waterBase))) {
+          that.$message.error('水分基准输入错误,最多保留1位小数,基准水分须可被0.1整除!');
+        } else {
+          this.$message.error('基准水分不能为空!');
+        }
+        return false
+      }
+      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('干粮收购价格不能为空!');
+            this.$message.error('扣重比不能为空!');
           }
           return false
         }
-
-        if (this.baseInfoForm.waterMin == '' || _baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this
-            .baseInfoForm.waterMin))) {
-          if (this.baseInfoForm.waterMin == '') {
-            this.$message.error('干粮水分不能为空!')
-          }
-          if (_baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this.baseInfoForm.waterMin))) {
-            that.$message.error('干粮水分输入错误,最多保留1位小数,干粮水分须可被0.1整除!')
-          }
-          return false
+      }
+      if (this.baseInfoForm.dryGrainPrice == '' || _baseWaterValidate(0, 1000, 4, '', 'deductWeight', parseFloat(this
+        .baseInfoForm.dryGrainPrice))) {
+        if (_baseWaterValidate(0, 1000, 4, '', 'deductWeight', parseFloat(this.baseInfoForm.dryGrainPrice))) {
+          that.$message.error('干粮收购价输入错误!');
+        } else {
+          this.$message.error('干粮收购价格不能为空!');
         }
-        if (Number(this.baseInfoForm.waterBase)>Number(this.baseInfoForm.waterMax)) {
-            this.$message.error('基准水分须小于水分上限!')
-          return false
+        return false
+      }
+
+      if (this.baseInfoForm.waterMin == '' || _baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this
+        .baseInfoForm.waterMin))) {
+        if (this.baseInfoForm.waterMin == '') {
+          this.$message.error('干粮水分不能为空!')
         }
-        
-        if (Number(this.baseInfoForm.waterMin)>Number(this.baseInfoForm.waterBase)) {
-            this.$message.error('干粮水分须小于基准水分!')
-          return false
+        if (_baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this.baseInfoForm.waterMin))) {
+          that.$message.error('干粮水分输入错误,最多保留1位小数,干粮水分须可被0.1整除!')
         }
+        return false
+      }
+      if (Number(this.baseInfoForm.waterBase) > Number(this.baseInfoForm.waterMax)) {
+        this.$message.error('基准水分须小于水分上限!')
+        return false
+      }
 
-        if (this.baseInfoForm.waterMax == '' || _baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this
-            .baseInfoForm.waterMax))) {
-          if (_baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this.baseInfoForm.waterMax))) {
-            that.$message.error('水分上限输入错误,最多保留1位小数,干粮水分须可被0.1整除!');
-          } else {
-            this.$message.error('水分上限不能为空!');
-          }
-          return false
+      if (Number(this.baseInfoForm.waterMin) > Number(this.baseInfoForm.waterBase)) {
+        this.$message.error('干粮水分须小于基准水分!')
+        return false
+      }
+
+      if (this.baseInfoForm.waterMax == '' || _baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this
+        .baseInfoForm.waterMax))) {
+        if (_baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this.baseInfoForm.waterMax))) {
+          that.$message.error('水分上限输入错误,最多保留1位小数,干粮水分须可被0.1整除!');
+        } else {
+          this.$message.error('水分上限不能为空!');
+        }
+        return false
+      }
+      if (this.baseInfoForm.saleLimit == '' || _baseWaterValidate(100, 10000000, '', '', 'saleLimit', parseFloat(this
+        .baseInfoForm.saleLimit))) {
+        if (_baseWaterValidate(100, 10000000, '', '', 'saleLimit', parseFloat(this.baseInfoForm.saleLimit))) {
+          that.$message.error('销售上限输入错误!');
+        } else {
+          that.$message.error('销售上限不能为空!');
         }
-        if (this.baseInfoForm.saleLimit == '' || _baseWaterValidate(100, 10000000, '', '', 'saleLimit', parseFloat(this
-            .baseInfoForm.saleLimit))) {
-          if (_baseWaterValidate(100, 10000000, '', '', 'saleLimit', parseFloat(this.baseInfoForm.saleLimit))) {
-            that.$message.error('销售上限输入错误!');
+        return false
+      }
+      if (this.checkList.length != 4) {
+        this.$message.error('粮价设置为4个等级!');
+        return false
+      }
+      for (let i = 0; i < this.priceList.length; i++) {
+        let _item = this.priceList[i]
+        if (this.baseInfoForm.paramType == '2' && (_item.basicUnitPrice == '' || _baseWaterValidate(0, 50, 8, '', 'deductWeight', parseFloat(_item
+          .basicUnitPrice)))) {
+          if (_item.basicUnitPrice == '') {
+            that.$message.error('基准单价不能为空!');
           } else {
-            that.$message.error('销售上限不能为空!');
+            that.$message.error('基准单价输入错误,0-50数字最多保留两位小数!');
           }
           return false
         }
-        if (this.checkList.length != 4) {
-          this.$message.error('粮价设置为4个等级!');
+        if (_item.checkList.length == 0) {
+          this.$message.error('等级不能为空!');
           return false
         }
-        for (let i = 0; i < this.priceList.length; i++) {
-          let _item = this.priceList[i]
-          if (this.baseInfoForm.paramType == '2' &&(_item.basicUnitPrice == '' || _baseWaterValidate(0, 50, 8, '', 'deductWeight', parseFloat(_item
-              .basicUnitPrice)))) {
-            if (_item.basicUnitPrice == '') {
-              that.$message.error('基准单价不能为空!');
-            } else {
-              that.$message.error('基准单价输入错误,0-50数字最多保留两位小数!');
-            }
-            return false
-          }
-          if (_item.checkList.length == 0) {
-            this.$message.error('等级不能为空!');
-            return false
-          }
-          var arr = []
-          for (let j = 0; j < _item.detailList.length; j++) {
-            let _item1 = _item.detailList[j]
-            if (_item1.type == 4) {
-              if (_item1.jfprice == '' || _baseWaterValidate(0, 100, 8, '', 'deductWeight', parseFloat(_item1
-                  .jfprice))) {
-                if (_item1.jfprice == '') {
-                  if(this.baseInfoForm.paramType == '1'){
-                    that.$message.error('扣重比不能为空!');
-                  }
-                  else{
-                    that.$message.error('降幅价格不能为空!');
-                  }
-                } else {
-                  if(this.baseInfoForm.paramType == '1'){
-                    that.$message.error('扣重比输入错误!');
-                  }
-                  else{
-                    that.$message.error('降幅输入错误!');
-                  }
+        var arr = []
+        for (let j = 0; j < _item.detailList.length; j++) {
+          let _item1 = _item.detailList[j]
+          if (_item1.type == 4) {
+            if (_item1.jfprice == '' || _baseWaterValidate(0, 100, 8, '', 'deductWeight', parseFloat(_item1
+              .jfprice))) {
+              if (_item1.jfprice == '') {
+                if (this.baseInfoForm.paramType == '1') {
+                  that.$message.error('扣重比不能为空!');
                 }
-                return false
-              }
-            } else {
-              if (_item1.water == '' || _baseWaterValidate(0, 100, 1, 0.1, 'waterBase', parseFloat(_item1.water))) {
-                if (_item1.water == '') {
-                  that.$message.error('分界水分不能为空!')
-                } else {
-                  that.$message.error('分界值输入错误!');
+                else {
+                  that.$message.error('降幅价格不能为空!');
+                }
+              } else {
+                if (this.baseInfoForm.paramType == '1') {
+                  that.$message.error('扣重比输入错误!');
+                }
+                else {
+                  that.$message.error('降幅输入错误!');
                 }
-                return false
               }
-              arr.push(_item1.water)
+              return false
             }
+          } else {
+            if (_item1.water == '' || _baseWaterValidate(0, 100, 1, 0.1, 'waterBase', parseFloat(_item1.water))) {
+              if (_item1.water == '') {
+                that.$message.error('分界水分不能为空!')
+              } else {
+                that.$message.error('分界值输入错误!');
+              }
+              return false
+            }
+            arr.push(_item1.water)
           }
-          if(!this.isIncrease(arr,arr.length)){
-            that.$message.error('水分大小排序错误!');
-            return false
-          }
-        }
-        return true
-      },
-      getEditCheckList() {
-        let _data = this.baseInfoForm.details
-        let _list = []
-        for (let k = 0; k < _data.length; k++) {
-          let _list1 = []
-          _list1 = _data[k].level.split(',')
-          _list = _list.concat(_list1)
         }
-        this.checkList = [...new Set(_list)];
-        console.log(this.checkList)
-      },
-      isIncrease(arr,len){
-        if(len == 1){
-          return true
+        if (!this.isIncrease(arr, arr.length)) {
+          that.$message.error('水分大小排序错误!');
+          return false
         }
-        return (arr[len - 2] <= arr[len - 1]) && this.isIncrease(arr,len - 1)
-      },
-      // 提交
-      submit() {
-          let isValidate = false
-          isValidate = this.validate()
-         
-        if (isValidate) {
-          this.makeTableList()
-          this.baseInfoForm.details = []
-          this.makePriceDataList()
-          this.baseInfoForm.goodsName = this.selectVal
-          switch (this.$route.query.type) {
-            case '查看':
-              this.isCountShow = false;
-              break;
-            case '新增':
-              isValidate = this.validate()
-              if (isValidate) {
-                purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
-                  // this.tableData = response.records
-                  this.isCountShow = false
-                })
-              }
-              break;
-            case '编辑':
-              this.getEditCheckList()
-              isValidate = this.validate()
-              if (isValidate) {
+      }
+      return true
+    },
+    getEditCheckList() {
+      let _data = this.baseInfoForm.details
+      let _list = []
+      for (let k = 0; k < _data.length; k++) {
+        let _list1 = []
+        _list1 = _data[k].level.split(',')
+        _list = _list.concat(_list1)
+      }
+      this.checkList = [...new Set(_list)];
+      console.log(this.checkList)
+    },
+    isIncrease(arr, len) {
+      if (len == 1) {
+        return true
+      }
+      return (arr[len - 2] <= arr[len - 1]) && this.isIncrease(arr, len - 1)
+    },
+    // 提交
+    submit() {
+      let isValidate = false
+      isValidate = this.validate()
+
+      if (isValidate) {
+        this.makeTableList()
+        this.baseInfoForm.details = []
+        this.makePriceDataList()
+        this.baseInfoForm.goodsName = this.selectVal
+        switch (this.$route.query.type) {
+          case '查看':
+            this.isCountShow = false;
+            break;
+          case '新增':
+            isValidate = this.validate()
+            if (isValidate) {
+              purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
+                // this.tableData = response.records
+                this.isCountShow = false
+              })
+            }
+            break;
+          case '编辑':
+            this.getEditCheckList()
+            isValidate = this.validate()
+            if (isValidate) {
+              purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
+                this.isCountShow = false
+              })
+            }
+            break;
+          case '审核中':
+            // this.makePriceDataList()
+            this.getEditCheckList()
+            isValidate = this.validate()
+            if (isValidate) {
+              let that = this
+              this.$confirm(`是否确定通过?`, {
+                cancelButtonText: '取消',
+                confirmButtonText: '确定',
+                type: 'warning',
+              }).then(() => {
                 purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
-                  this.isCountShow = false
-                })
-              }
-              break;
-            case '审核中':
-              // this.makePriceDataList()
-              this.getEditCheckList()
-              isValidate = this.validate()
-              if (isValidate) {
-                let that = this
-                this.$confirm(`是否确定通过?`, {
-                  cancelButtonText: '取消',
-                  confirmButtonText: '确定',
-                  type: 'warning',
-                }).then(() => {
-                  purchasePriceEdit(this.baseInfoForm).toPromise().then((response) => {
-                    //审核
-                    that.audit(this.baseInfoForm, true, 2)
-                  })
+                  //审核
+                  that.audit(this.baseInfoForm, true, 2)
                 })
-                
-              }
-              break;
-          }
-       }
-      },
-      //审核
-      audit(item, status, status2) {
-        posthandle({
-            taskId: item.taskId,
-            approved: status,
-            auditMind: '',
-            needReapply: status2 != undefined ? true : false,
-          })
-          .toPromise()
-          .then((response) => {
-            this.isCountShow = false
-            this.isShowTip = true
-             this.getData()
-          })
-          .catch((req) => {
-            this.$message.warning(req.message)
-          })
-      },
-      // 关闭
-      closeCount() {
-        this.isCountShow = true
-        this.splitPriceList = []
-        this.$router.push({
-          name: 'acquisitionManagement',
+              })
+
+            }
+            break;
+        }
+      }
+    },
+    //审核
+    audit(item, status, status2) {
+      posthandle({
+        taskId: item.taskId,
+        approved: status,
+        auditMind: '',
+        needReapply: status2 != undefined ? true : false,
+      })
+        .toPromise()
+        .then((response) => {
+          this.isCountShow = false
+          this.isShowTip = true
+          this.getData()
         })
-      },
-      //处理价格表格数据
-      makeTableList() {
-        // 获取等级对应分界钱数
-        this.getSplitPrice()
-        // 构造表格等差数列
-        let _list = []
-        let _obj = {}
-        let _waterMin = parseFloat(this.baseInfoForm.waterMin)
-        let _waterMax = parseFloat(this.baseInfoForm.waterBase)
-        let _count = Number(((_waterMax - _waterMin) / 0.1).toFixed(0)) 
-        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]),
+        .catch((req) => {
+          this.$message.warning(req.message)
+        })
+    },
+    // 关闭
+    closeCount() {
+      this.isCountShow = true
+      this.splitPriceList = []
+      this.$router.push({
+        name: 'acquisitionManagement',
+      })
+    },
+    //处理价格表格数据
+    makeTableList() {
+      // 获取等级对应分界钱数
+      this.getSplitPrice()
+      // 构造表格等差数列
+      let _list = []
+      let _obj = {}
+      let _waterMin = parseFloat(this.baseInfoForm.waterMin)
+      let _waterMax = parseFloat(this.baseInfoForm.waterBase)
+      let _count = Number(((_waterMax - _waterMin) / 0.1).toFixed(0))
+      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]),
+          }
+          for (let i = 0; i < priceList.length; i++) {
+            if (priceList[i].level == '一等') {
+              _obj.price1 = this.keepTwoDecimal(priceList[i].val)
             }
-            for(let i= 0;i<priceList.length;i++){
-                  if(priceList[i].level=='一等'){
-                  _obj.price1 = this.keepTwoDecimal(priceList[i].val)
-                  }
-                  else if(priceList[i].level=='二等'){
-                      _obj.price2 = this.keepTwoDecimal(priceList[i].val)
-                  }
-                   else if(priceList[i].level=='三等'){
-                       _obj.price3 = this.keepTwoDecimal(priceList[i].val)
-                   }
-                   else{
-                    _obj.priceOther = this.keepTwoDecimal(priceList[i].val)
-                   }
-              }
+            else if (priceList[i].level == '二等') {
+              _obj.price2 = this.keepTwoDecimal(priceList[i].val)
+            }
+            else if (priceList[i].level == '三等') {
+              _obj.price3 = this.keepTwoDecimal(priceList[i].val)
+            }
+            else {
+              _obj.priceOther = this.keepTwoDecimal(priceList[i].val)
+            }
+          }
+
+          _list.unshift(_obj)
+        }
+        _obj = {}
+        _waterMin = parseFloat(this.baseInfoForm.waterBase)
+        _waterMax = parseFloat(this.baseInfoForm.waterMax)
+        _count = Number(((_waterMax - _waterMin) / 0.1).toFixed(0))
+        for (let i = 0; i < _count; i++) {
+          // if (i == 0) {
+          //   _waterMin += 0.4
+          // } else {
+          //   _waterMin += 0.5
+          // }
+          if (i != 0) {
+            _waterMin += 0.1
+          }
 
-            _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 = Number(((_waterMax - _waterMin) / 0.1).toFixed(0))
-          for (let i = 0; i < _count; i++) {
-            // if (i == 0) {
-            //   _waterMin += 0.4
-            // } else {
-            //   _waterMin += 0.5
-            // }
-            if (i != 0) {
-              _waterMin += 0.1
+          for (let i = 0; i < priceList.length; i++) {
+            if (priceList[i].level == '一等') {
+              _obj.price1 = this.keepTwoDecimal(priceList[i].val)
             }
-            
-            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]),
+            else if (priceList[i].level == '二等') {
+              _obj.price2 = this.keepTwoDecimal(priceList[i].val)
             }
-            for(let i= 0;i<priceList.length;i++){
-                  if(priceList[i].level=='一等'){
-                  _obj.price1 = this.keepTwoDecimal(priceList[i].val)
-                  }
-                  else if(priceList[i].level=='二等'){
-                      _obj.price2 = this.keepTwoDecimal(priceList[i].val)
-                  }
-                   else if(priceList[i].level=='三等'){
-                       _obj.price3 = this.keepTwoDecimal(priceList[i].val)
-                   }
-                   else{
-                    _obj.priceOther = this.keepTwoDecimal(priceList[i].val)
-                   }
-              }
+            else if (priceList[i].level == '三等') {
+              _obj.price3 = this.keepTwoDecimal(priceList[i].val)
+            }
+            else {
+              _obj.priceOther = this.keepTwoDecimal(priceList[i].val)
+            }
+          }
 
-            _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
+      }
+      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]),
+          }
+          for (let i = 0; i < priceList.length; i++) {
+            if (priceList[i].level == '一等') {
+              _obj.price1 = this.keepTwoDecimal(priceList[i].val)
             }
-            
-            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]),
+            else if (priceList[i].level == '二等') {
+              _obj.price2 = this.keepTwoDecimal(priceList[i].val)
+            }
+            else if (priceList[i].level == '三等') {
+              _obj.price3 = this.keepTwoDecimal(priceList[i].val)
+            }
+            else {
+              _obj.priceOther = this.keepTwoDecimal(priceList[i].val)
             }
-            for(let i= 0;i<priceList.length;i++){
-              if(priceList[i].level=='一等'){
-              _obj.price1 = this.keepTwoDecimal(priceList[i].val)
-              }
-              else if(priceList[i].level=='二等'){
-                  _obj.price2 = this.keepTwoDecimal(priceList[i].val)
-              }
-                else if(priceList[i].level=='三等'){
-                    _obj.price3 = this.keepTwoDecimal(priceList[i].val)
-                }
-                else{
-                _obj.priceOther = this.keepTwoDecimal(priceList[i].val)
-                }
-              }
-            _list.push(_obj)
-            console.log('_list', _list)
-
           }
+          _list.push(_obj)
+          console.log('_list', _list)
+
         }
-        this.baseInfoForm.detailPrints = _list
-        this.tableData = _list
-      },
-      // 获取分界价格数据,构造分界价格区间数据
-      getSplitPrice() {
-        let that = this;
-        this.left = []
-        this.right = []
-        let _priceList = this.priceList;
-        for (let i = 0; i < _priceList.length; i++) {
-          for (let k = 0; k < _priceList[i].checkList.length; k++) {
-            let _leftObj = {}
-            _leftObj.level = _priceList[i].checkList[k]
-            _leftObj.basicUnitPrice = parseFloat(_priceList[i].basicUnitPrice)
-            _leftObj.priceList = []
-            _leftObj.haveSplit = false
-
-            let _rightObj = {}
-            _rightObj.level = _priceList[i].checkList[k]
-            _rightObj.basicUnitPrice = parseFloat(_priceList[i].basicUnitPrice)
-            _rightObj.priceList = []
-            _rightObj.haveSplit = false
-
-            //获取基准在x轴索引
+      }
+      this.baseInfoForm.detailPrints = _list
+      this.tableData = _list
+    },
+    // 获取分界价格数据,构造分界价格区间数据
+    getSplitPrice() {
+      let that = this;
+      this.left = []
+      this.right = []
+      let _priceList = this.priceList;
+      for (let i = 0; i < _priceList.length; i++) {
+        for (let k = 0; k < _priceList[i].checkList.length; k++) {
+          let _leftObj = {}
+          _leftObj.level = _priceList[i].checkList[k]
+          _leftObj.basicUnitPrice = parseFloat(_priceList[i].basicUnitPrice)
+          _leftObj.priceList = []
+          _leftObj.haveSplit = false
+
+          let _rightObj = {}
+          _rightObj.level = _priceList[i].checkList[k]
+          _rightObj.basicUnitPrice = parseFloat(_priceList[i].basicUnitPrice)
+          _rightObj.priceList = []
+          _rightObj.haveSplit = false
+
+          //获取基准在x轴索引
 
           let index = 0
-          for(;index<_priceList[i].detailList.length;index++){
-              if(_priceList[i].detailList[index].water==that.baseInfoForm.waterBase){
-                break
+          for (; index < _priceList[i].detailList.length; index++) {
+            if (_priceList[i].detailList[index].water == that.baseInfoForm.waterBase) {
+              break
             }
           }
-           console.log(index)
+          console.log(index)
           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(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)
-                    })
+            if (_priceList[i].detailList[j] && _priceList[i].detailList[j].type != 4) {
+              if (_priceList[i].detailList[j].type != 1) {
+                let baseprice = ''
+                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)))
                   }
-                  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]
+                  _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)
+                  })
+                }
+                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)
-                    })
                   }
-                  
+                  _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) {
-            //       let baseprice = ""
-            //       if (j == (_priceList[i].detailList.length + 1) / 2 - 1) {
-            //         baseprice = parseFloat(_priceList[i].basicUnitPrice)
-            //       } else {
-            //         baseprice = parseFloat(_priceList[i].basicUnitPrice + (parseFloat(_priceList[i].detailList[j + 2]
-            //           .water) - parseFloat(_priceList[i].detailList[j].water)) / 0.5 * 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.5 * parseFloat(_priceList[i].detailList[j - 1].jfprice)
-            //       })
-            //     }
-            //   }
-            // }
-            this.left.push(_leftObj)
-            console.log('this.left', this.left)
-            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)
-                    })
+          }
+
+          // 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) {
+          //       let baseprice = ""
+          //       if (j == (_priceList[i].detailList.length + 1) / 2 - 1) {
+          //         baseprice = parseFloat(_priceList[i].basicUnitPrice)
+          //       } else {
+          //         baseprice = parseFloat(_priceList[i].basicUnitPrice + (parseFloat(_priceList[i].detailList[j + 2]
+          //           .water) - parseFloat(_priceList[i].detailList[j].water)) / 0.5 * 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.5 * parseFloat(_priceList[i].detailList[j - 1].jfprice)
+          //       })
+          //     }
+          //   }
+          // }
+          this.left.push(_leftObj)
+          console.log('this.left', this.left)
+          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))
+          }
+          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
                     }
-                    _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)
-                    })
+                    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)
+                  })
                 }
               }
             }
-
-            // 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) {
-            //     if (_priceList[i].detailList[k].type != 3) {
-            //       let baseprice = ""
-            //       if (k == (_priceList[i].detailList.length + 1) / 2 - 1) {
-            //         baseprice = parseFloat(_priceList[i].basicUnitPrice)
-            //       } else {
-            //         baseprice = parseFloat(_priceList[i].basicUnitPrice - (parseFloat(_priceList[i].detailList[k]
-            //           .water) - parseFloat(_priceList[i].detailList[k - 2].water)) / 0.5 * 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.5 * parseFloat(_priceList[i].detailList[k + 1].jfprice)
-            //       })
-            //     }
-            //   }
-            // }
-            this.right.push(_rightObj)
-            console.log('this.right', this.right)
           }
+
+          // 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) {
+          //     if (_priceList[i].detailList[k].type != 3) {
+          //       let baseprice = ""
+          //       if (k == (_priceList[i].detailList.length + 1) / 2 - 1) {
+          //         baseprice = parseFloat(_priceList[i].basicUnitPrice)
+          //       } else {
+          //         baseprice = parseFloat(_priceList[i].basicUnitPrice - (parseFloat(_priceList[i].detailList[k]
+          //           .water) - parseFloat(_priceList[i].detailList[k - 2].water)) / 0.5 * 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.5 * parseFloat(_priceList[i].detailList[k + 1].jfprice)
+          //       })
+          //     }
+          //   }
+          // }
+          this.right.push(_rightObj)
+          console.log('this.right', this.right)
         }
-      },
-      // 获取当前价格左右价格区间数据
-      getOtherPrice(list, water, direction) {},
-      calculatePriceRight(_waterMax) {
-        //获取每个分界值
-        let _listResult = []
-        for (let i = 0; i < this.right.length; i++) {
-          let _list = this.right[i].priceList
-            let tmp = {}
-          for (let k = 0; k < _list.length; k++) {
-            if (_waterMax < _list[k].priceEnd && _waterMax >= _list[k].priceStart) {
-              tmp.level = this.left[i].level
-              tmp.val = parseFloat(_list[k].baseprice - _list[k].jfprice * (((_waterMax) - _list[k].priceStart) / 0.1))
-            }
+      }
+    },
+    // 获取当前价格左右价格区间数据
+    getOtherPrice(list, water, direction) { },
+    calculatePriceRight(_waterMax) {
+      //获取每个分界值
+      let _listResult = []
+      for (let i = 0; i < this.right.length; i++) {
+        let _list = this.right[i].priceList
+        let tmp = {}
+        for (let k = 0; k < _list.length; k++) {
+          if (_waterMax < _list[k].priceEnd && _waterMax >= _list[k].priceStart) {
+            tmp.level = this.left[i].level
+            tmp.val = parseFloat(_list[k].baseprice - _list[k].jfprice * (((_waterMax) - _list[k].priceStart) / 0.1))
           }
-          _listResult.push(tmp)
         }
-        return _listResult
-      },
-      // 计算价格
-      calculatePrice(_waterMax) {
-        let _listResult = []
-        for (let i = 0; i < this.left.length; i++) {
-          let _list = this.left[i].priceList
-          let tmp = {}
-          for (let k = 0; k < _list.length; k++) {
-            if (_waterMax >= _list[k].priceEnd && _waterMax < _list[k].priceStart) {
-              tmp.level = this.left[i].level
-              tmp.val = parseFloat(_list[k].baseprice + _list[k].jfprice * ((_list[k].priceStart - (_waterMax )) / 0.1))
-            }
+        _listResult.push(tmp)
+      }
+      return _listResult
+    },
+    // 计算价格
+    calculatePrice(_waterMax) {
+      let _listResult = []
+      for (let i = 0; i < this.left.length; i++) {
+        let _list = this.left[i].priceList
+        let tmp = {}
+        for (let k = 0; k < _list.length; k++) {
+          if (_waterMax >= _list[k].priceEnd && _waterMax < _list[k].priceStart) {
+            tmp.level = this.left[i].level
+            tmp.val = parseFloat(_list[k].baseprice + _list[k].jfprice * ((_list[k].priceStart - (_waterMax)) / 0.1))
           }
-          _listResult.push(tmp)
         }
-        return _listResult
-      },
-      // 构造查看粮价设置数据
-      makeLookPriceList() {
-        this.selectVal = this.baseInfoForm.goodsName
-        let _priceList = this.baseInfoForm.details
-        let _checkList = []
-        let _detailList = []
-        let _pointPrice = []
-        let _basePrice = 0
-        for (let i = 0; i < _priceList.length; i++) {
-          _checkList = _priceList[i].level.split(',')
-          _detailList = _priceList[i].point.split(',')
-          _pointPrice = _priceList[i].pointPrice.split(',')
-          let _newDetailList = []
-          for (let k = 0; k < _detailList.length; k++) {
-            let _obj = {}
-            if (_detailList[k] == this.baseInfoForm.waterMin) {
-              _obj = {
-                type: 1,
-                name: '干粮',
-                water: _detailList[k],
-                isWrite: false
-              }
-
-            } else if (_detailList[k] == this.baseInfoForm.waterMax) {
-              _obj = {
-                type: 3,
-                name: '上限',
-                water: _detailList[k],
-                isWrite: false
-              }
-            } else if (_detailList[k] == this.baseInfoForm.waterBase) {
-              _obj = {
-                type: 2,
-                name: '基准',
-                water: _detailList[k],
-                isWrite: false
-              }
-            } else {
-              _obj = {
-                name: '分界',
-                water: _detailList[k],
-                type: 5,
-                index: k,
-                isWrite: true
-              }
+        _listResult.push(tmp)
+      }
+      return _listResult
+    },
+    // 构造查看粮价设置数据
+    makeLookPriceList() {
+      this.selectVal = this.baseInfoForm.goodsName
+      let _priceList = this.baseInfoForm.details
+      let _checkList = []
+      let _detailList = []
+      let _pointPrice = []
+      let _basePrice = 0
+      for (let i = 0; i < _priceList.length; i++) {
+        _checkList = _priceList[i].level.split(',')
+        _detailList = _priceList[i].point.split(',')
+        _pointPrice = _priceList[i].pointPrice.split(',')
+        let _newDetailList = []
+        for (let k = 0; k < _detailList.length; k++) {
+          let _obj = {}
+          if (_detailList[k] == this.baseInfoForm.waterMin) {
+            _obj = {
+              type: 1,
+              name: '干粮',
+              water: _detailList[k],
+              isWrite: false
+            }
 
+          } else if (_detailList[k] == this.baseInfoForm.waterMax) {
+            _obj = {
+              type: 3,
+              name: '上限',
+              water: _detailList[k],
+              isWrite: false
             }
-            _newDetailList.push(_obj)
-            if (k != _detailList.length - 1) {
-              _newDetailList.push({
-                type: 4,
-                jfprice: _pointPrice[k]
-              })
+          } else if (_detailList[k] == this.baseInfoForm.waterBase) {
+            _obj = {
+              type: 2,
+              name: '基准',
+              water: _detailList[k],
+              isWrite: false
+            }
+          } else {
+            _obj = {
+              name: '分界',
+              water: _detailList[k],
+              type: 5,
+              index: k,
+              isWrite: true
             }
+
           }
-          let _obj = {
-            basicUnitPrice: _priceList[i].basePrice,
-            index: i,
-            checkList: _checkList,
-            detailList: _newDetailList
+          _newDetailList.push(_obj)
+          if (k != _detailList.length - 1) {
+            _newDetailList.push({
+              type: 4,
+              jfprice: _pointPrice[k]
+            })
           }
-          this.priceList.push(_obj)
         }
+        let _obj = {
+          basicUnitPrice: _priceList[i].basePrice,
+          index: i,
+          checkList: _checkList,
+          detailList: _newDetailList
+        }
+        this.priceList.push(_obj)
       }
-    },
-  }
+    }
+  },
+}
 </script>
 <style lang="scss">
-  .el-table .warning-row {
-    background: oldlace;
-  }
-
-  .el-table .success-row {
-    background: #f0f9eb;
-  }
-
-  .el-checkbox__input.is-checked .el-checkbox__inner,
-  .el-checkbox__input.is-indeterminate .el-checkbox__inner {
-    background-color: #5878E8;
-    border-color: #5878E8;
-  }
-
-  .el-checkbox__input.is-checked+.el-checkbox__label {
-    color: #5878E8;
-  }
-
-  .el-checkbox.is-bordered.is-checked {
-    border-color: #5878E8;
-  }
-
-  .el-checkbox__input.is-focus .el-checkbox__inner {
-    border-color: #5878E8;
-  }
-
-  .basic-container {
-    overflow: auto;
-  }
-
-  .container {
-    padding: 20px
+.el-table .warning-row {
+  background: oldlace;
+}
+
+.el-table .success-row {
+  background: #f0f9eb;
+}
+
+.el-checkbox__input.is-checked .el-checkbox__inner,
+.el-checkbox__input.is-indeterminate .el-checkbox__inner {
+  background-color: #5878E8;
+  border-color: #5878E8;
+}
+
+.el-checkbox__input.is-checked+.el-checkbox__label {
+  color: #5878E8;
+}
+
+.el-checkbox.is-bordered.is-checked {
+  border-color: #5878E8;
+}
+
+.el-checkbox__input.is-focus .el-checkbox__inner {
+  border-color: #5878E8;
+}
+
+.basic-container {
+  overflow: auto;
+}
+
+.container {
+  padding: 20px
+}
+
+/deep/.el-header {
+  padding: 0;
+}
+
+.header {
+  display: flex;
+  align-items: center;
+  border-bottom: 1px solid #E9ECF7;
+  padding-bottom: 10px;
+  width: 100%;
+
+  .head-icon {
+    width: 19px;
+    height: 19px;
+    margin-right: 10px;
   }
 
-  /deep/.el-header {
-    padding: 0;
+  .head-title {
+    font-size: 21px;
+    font-weight: 600;
+    color: #323233;
   }
+}
 
-  .header {
-    display: flex;
-    align-items: center;
-    border-bottom: 1px solid #E9ECF7;
-    padding-bottom: 10px;
-    width: 100%;
-
-    .head-icon {
-      width: 19px;
-      height: 19px;
-      margin-right: 10px;
-    }
-
-    .head-title {
-      font-size: 21px;
-      font-weight: 600;
-      color: #323233;
-    }
-  }
+.row1,
+.row2 {
+  // background: red;
+  display: flex;
+  // margin-right: 20px;
+}
 
-  .row1,
-  .row2 {
-    // background: red;
+.row3 {
+  .top {
     display: flex;
-    // margin-right: 20px;
-  }
 
-  .row3 {
-    .top {
-      display: flex;
-
-      .btn {
-        width: 52px;
-        height: 24px;
-        background: #5878E8;
-        color: white;
-        margin-left: 20px;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        // text-align: center;
-      }
-    }
-
-    .title {
+    .btn {
+      width: 52px;
+      height: 24px;
+      background: #5878E8;
+      color: white;
+      margin-left: 20px;
       display: flex;
       align-items: center;
-      border-left: 4px solid #5473E8;
-      font-size: 16px;
-      font-weight: 600;
-      color: #323233;
-      padding-left: 10px;
+      justify-content: center;
+      // text-align: center;
     }
   }
 
-  .base-info {
+  .title {
+    display: flex;
+    align-items: center;
     border-left: 4px solid #5473E8;
     font-size: 16px;
     font-weight: 600;
     color: #323233;
     padding-left: 10px;
-    margin: 24px 0 10px 0;
-  }
-
-  .grid-content {
-    margin-right: 20px;
   }
+}
+
+.base-info {
+  border-left: 4px solid #5473E8;
+  font-size: 16px;
+  font-weight: 600;
+  color: #323233;
+  padding-left: 10px;
+  margin: 24px 0 10px 0;
+}
+
+.grid-content {
+  margin-right: 20px;
+}
+
+.content {
+  border: 1px solid #D8DCE6;
+  margin: 20px 0;
+  padding: 15px;
+  border-radius: 4px;
+
+  .top {
+    display: flex;
+    justify-content: space-between;
 
-  .content {
-    border: 1px solid #D8DCE6;
-    margin: 20px 0;
-    padding: 15px;
-    border-radius: 4px;
-
-    .top {
+    .left {
       display: flex;
-      justify-content: space-between;
-
-      .left {
-        display: flex;
-        align-items: center;
+      align-items: center;
 
-        .text {
-          width: 220px;
-          font-size: 14px;
-          font-weight: 400;
-          color: #8890B1;
-        }
+      .text {
+        width: 220px;
+        font-size: 14px;
+        font-weight: 400;
+        color: #8890B1;
       }
     }
+  }
 
-    .level {
-      margin: 10px 0;
-    }
-
-    .count {
-      display: flex;
-      margin-bottom: 15px;
-
-      .left {
-        width: 10%;
-        display: flex;
-        flex-direction: column;
-        align-items: flex-end;
-        justify-content: flex-end;
-        line-height: 24px;
-      }
-
-      .right {
-        width: 85%;
-        position: relative;
-        padding-bottom: 50px;
-
-        .water-price {
-          width: 60px;
-          height: 30px;
-          background: #F6F7FB;
-          border-radius: 4px;
-          border: 1px solid #D8DCE6;
-          text-align: center
-        }
-
-        .add,
-        .reduce {
-          width: 16px;
-          height: 16px;
-          background: #5473E8;
-          border-radius: 2px;
-          color: white;
-          background: #5473E8;
-          border-radius: 2px;
-          color: white;
-          padding: 0 !important;
-          display: inline-flex;
-          justify-content: center;
-          align-items: center;
-          font-size: 14px;
-        }
+  .level {
+    margin: 10px 0;
+  }
 
-        .reduce {
-          background: white;
-          color: #D5D8DE;
-          border: 1px solid #D5D8DE;
-          display: inline-flex;
-          justify-content: center;
-          align-items: center;
-        }
+  .count {
+    display: flex;
+    margin-bottom: 15px;
 
-        .item-style {
-          position: relative;
+    .left {
+      width: 10%;
+      display: flex;
+      flex-direction: column;
+      align-items: flex-end;
+      justify-content: flex-end;
+      line-height: 24px;
+    }
 
-          .item-style-title {
-            margin-bottom: 10px;
-            text-align: center;
-          }
-        }
+    .right {
+      width: 85%;
+      position: relative;
+      padding-bottom: 50px;
+
+      .water-price {
+        width: 60px;
+        height: 30px;
+        background: #F6F7FB;
+        border-radius: 4px;
+        border: 1px solid #D8DCE6;
+        text-align: center
+      }
 
-        .line {
-          position: absolute;
-          top: 72px;
-          width: 100%;
-          height: 5px;
-          background: linear-gradient(39deg, #E6EEFF 0%, #91B0F5 42%, #5878E8 100%);
-          border-radius: 3px;
-        }
+      .add,
+      .reduce {
+        width: 16px;
+        height: 16px;
+        background: #5473E8;
+        border-radius: 2px;
+        color: white;
+        background: #5473E8;
+        border-radius: 2px;
+        color: white;
+        padding: 0 !important;
+        display: inline-flex;
+        justify-content: center;
+        align-items: center;
+        font-size: 14px;
+      }
 
-        .bottom-price {
-          position: absolute;
-          bottom: -10px;
-        }
+      .reduce {
+        background: white;
+        color: #D5D8DE;
+        border: 1px solid #D5D8DE;
+        display: inline-flex;
+        justify-content: center;
+        align-items: center;
+      }
 
-        .jt-style {
-          position: absolute;
-          top: 64px;
-          width: 0px;
-          height: 0px;
-          right: -15px;
-          border-left: 15px solid #5473E8;
-          border-top: 10px solid transparent;
-          border-bottom: 10px solid transparent;
-        }
+      .item-style {
+        position: relative;
 
-        display: flex;
-        justify-content: space-between;
-
-        .circle {
-          position: absolute;
-          z-index: 2;
-          width: 15px;
-          height: 15px;
-          background: #FFFFFF;
-          border: 3px solid #5473E8;
-          border-radius: 50%;
-          right: 40%;
-          bottom: -22px
+        .item-style-title {
+          margin-bottom: 10px;
+          text-align: center;
         }
-
       }
-    }
-  }
-
-  .submit {
-    float: right;
-    width: 74px;
-    height: 32px;
-    background: #5473E8;
-    color: white;
-    border-radius: 4px;
-  }
 
-  .page2-content {
-    border: 1px solid #D8DCE6;
-    margin-top: 20px;
-    padding: 10px;
-    box-sizing: border-box;
-    text-align: center;
-    border-radius: 4px;
-    padding-bottom: 20px;
-  }
+      .line {
+        position: absolute;
+        top: 72px;
+        width: 100%;
+        height: 5px;
+        background: linear-gradient(39deg, #E6EEFF 0%, #91B0F5 42%, #5878E8 100%);
+        border-radius: 3px;
+      }
 
-  .titel {
-    font-size: 20px;
-    font-weight: 500;
-    color: #323233;
-    margin: 20px;
-  }
+      .bottom-price {
+        position: absolute;
+        bottom: -10px;
+      }
 
-  .type {
-    font-size: 16px;
-    font-weight: 500;
-    color: #262626;
-  }
+      .jt-style {
+        position: absolute;
+        top: 64px;
+        width: 0px;
+        height: 0px;
+        right: -15px;
+        border-left: 15px solid #5473E8;
+        border-top: 10px solid transparent;
+        border-bottom: 10px solid transparent;
+      }
 
-  .double {
-    background: #FEFBF6 !important;
-  }
+      display: flex;
+      justify-content: space-between;
 
-  .single {
-    background: #F7FBFF !important;
-  }
+      .circle {
+        position: absolute;
+        z-index: 2;
+        width: 15px;
+        height: 15px;
+        background: #FFFFFF;
+        border: 3px solid #5473E8;
+        border-radius: 50%;
+        right: 40%;
+        bottom: -22px
+      }
 
-  .bottom-btn {
-    display: flex;
-    margin: 20px 0;
-    justify-content: space-around;
-    align-items: center;
-    .right{
-      width: 300px;
-      display: flex;
     }
   }
-  .white-bgc{
-    background: white!important;
+}
+
+.submit {
+  float: right;
+  width: 74px;
+  height: 32px;
+  background: #5473E8;
+  color: white;
+  border-radius: 4px;
+}
+
+.page2-content {
+  border: 1px solid #D8DCE6;
+  margin-top: 20px;
+  padding: 10px;
+  box-sizing: border-box;
+  text-align: center;
+  border-radius: 4px;
+  padding-bottom: 20px;
+}
+
+.titel {
+  font-size: 20px;
+  font-weight: 500;
+  color: #323233;
+  margin: 20px;
+}
+
+.type {
+  font-size: 16px;
+  font-weight: 500;
+  color: #262626;
+}
+
+.double {
+  background: #FEFBF6 !important;
+}
+
+.single {
+  background: #F7FBFF !important;
+}
+
+.bottom-btn {
+  display: flex;
+  margin: 20px 0;
+  justify-content: space-around;
+  align-items: center;
+
+  .right {
+    width: 300px;
+    display: flex;
   }
+}
 
+.white-bgc {
+  background: white !important;
+}
 </style>

+ 25 - 10
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -7,11 +7,11 @@
         <el-button @click='warehousetypechange(3)' :type="serviceManagementType == 3 ? 'primary' : ''">收购入库</el-button>
       </template>
       <template slot="right">
-        <ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType"
+        <el-select v-model="warehouseName"  filterable placeholder="" @change="warehouseNameChange" :value="searchType"
           style="margin: 0 10px">
-          <ws-option v-for="item in warehouseList" :key="'cangku' + item.value" :label="item.value" :value="item.value"
+          <el-option v-for="item in warehouseList" :key="'cangku' + item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
-        </ws-select>
+        </el-select>
         <!-- <el-checkbox @change='checkchange' v-model="checked">默认</el-checkbox> -->
       </template>
     </BaseHeaderLayout>
@@ -268,7 +268,9 @@
                 <ws-form-item
                   v-if='serviceManagementType == 1 || serviceManagementType == 3 && deptBudgetList.outType == "自运"'
                   label="车队" span="1" prop="fleetName">
-                  <el-select :disabled='recheck' v-model="deptBudgetList.fleet" placeholder="非车队车辆">
+                  <el-select @change="fleetNameChange" :disabled='recheck' v-model="deptBudgetList.fleet" placeholder="非车队车辆">
+                    <el-option  key="0" label="非车队"
+                      value="非车队" />
                     <el-option v-for="item in fleetNameList" :key="item.value" :label="item.fleetName"
                       :value="item.fleetName" />
                   </el-select>
@@ -745,6 +747,19 @@ export default {
     }
   },
   methods: {
+    fleetNameChange(e){
+        console.log(e,this.fleetNameList)
+        if(e=='非车队'){
+          this.weighingList.freight=''
+        }else{
+          for (let i = 0; i < this.fleetNameList.length; i++) {
+            if (this.fleetNameList[i].carNo == this.weighingList.fleetName) {
+              this.weighingList.freight = this.fleetNameList[i].tranPrice
+            }
+          }
+        }
+        
+      },
     getNowTime() {
       var now = new Date();
       var year = now.getFullYear(); //得到年份
@@ -2739,6 +2754,7 @@ export default {
                   .then((response) => {
                     this.deptBudgetList.warehouseInOutId = response
                     if(!this.deptBudgetList.id){
+                      this.$delete(this.deptBudgetList,'statusFlag')
                       inspectAdd(this.deptBudgetList)
                       .toPromise()
                       .then((response1) => {
@@ -2844,9 +2860,10 @@ export default {
                       })
                     }else{
                       this.deptBudgetList.id=zjid
-                      if (this.serviceManagementType==3) {
-                        this.deptBudgetList.statusFlag = this.qyJurisdiction&&!this.zjJurisdiction ? 7 : 1
-                      }
+                      // if (this.serviceManagementType==3) {
+                      //   this.deptBudgetList.statusFlag = this.qyJurisdiction&&!this.zjJurisdiction ? 7 : 1
+                      // }
+                      this.$delete(this.deptBudgetList,'statusFlag')
                       getinspectEdit(this.deptBudgetList)
                       .toPromise()
                       .then((response) => {
@@ -2981,9 +2998,7 @@ export default {
                       .catch((response) => { })
                   })
               } else if (this.statusTypetext == '确认') {
-                if (this.serviceManagementType==3) {
-                  this.deptBudgetList.statusFlag = 2
-                }
+                this.$delete(this.deptBudgetList,'statusFlag')
                 this.deptBudgetList.flag = 2
                 getinspectEdit(this.deptBudgetList)
                   .toPromise()

+ 90 - 90
src/views/platformAudit/component/routers/route.js

@@ -13,99 +13,99 @@ const platformauditRouter = {
     },
     children: [
 
-        // 粮商审核
-        {
-            path: 'grainmerchantreview',
-            component: () =>
-                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/grainmerchantreview'),
-            name: 'grainmerchantreview',
-            meta: {
-                title: 'grainmerchantreview',
-                shortcutEntrance: 'grainmerchantreview',
-                module: 'audit.grainMerchant.grainMerchantInfo',
-                permissicon: [],
-                keepAlive: true,
-                _title: '粮商审核'
-            },
-        },
+        // // 粮商审核
+        // {
+        //     path: 'grainmerchantreview',
+        //     component: () =>
+        //         import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/grainmerchantreview'),
+        //     name: 'grainmerchantreview',
+        //     meta: {
+        //         title: 'grainmerchantreview',
+        //         shortcutEntrance: 'grainmerchantreview',
+        //         module: 'audit.grainMerchant.grainMerchantInfo',
+        //         permissicon: [],
+        //         keepAlive: true,
+        //         _title: '粮商审核'
+        //     },
+        // },
 
-        //司机审核
-        {
-            path: 'driverreview',
-            component: () =>
-                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/driverreview'),
-            name: 'driverreview',
-            meta: {
-                title: 'driverreview',
-                shortcutEntrance: 'driverreview',
-                module: 'audit.driverMerchant.driverMerchantInfo',
-                permissicon: [],
-                keepAlive: true,
-                _title: '司机审核'
-            },
-        },
+        // //司机审核
+        // {
+        //     path: 'driverreview',
+        //     component: () =>
+        //         import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/driverreview'),
+        //     name: 'driverreview',
+        //     meta: {
+        //         title: 'driverreview',
+        //         shortcutEntrance: 'driverreview',
+        //         module: 'audit.driverMerchant.driverMerchantInfo',
+        //         permissicon: [],
+        //         keepAlive: true,
+        //         _title: '司机审核'
+        //     },
+        // },
 
-        //采购交易信息审核
-        {
-            path: 'transactioninformationreview',
-            component: () =>
-                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/transactioninformationreview'),
-            name: 'transactioninformationreview',
-            meta: {
-                title: 'transactioninformationreview',
-                shortcutEntrance: 'transactioninformationreview',
-                module: 'audit.tranMerchant.tranMerchantInfo',
-                permissicon: [],
-                keepAlive: true,
-                _title: '采购信息审核'
-            },
-        },
+        // //采购交易信息审核
+        // {
+        //     path: 'transactioninformationreview',
+        //     component: () =>
+        //         import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/transactioninformationreview'),
+        //     name: 'transactioninformationreview',
+        //     meta: {
+        //         title: 'transactioninformationreview',
+        //         shortcutEntrance: 'transactioninformationreview',
+        //         module: 'audit.tranMerchant.tranMerchantInfo',
+        //         permissicon: [],
+        //         keepAlive: true,
+        //         _title: '采购信息审核'
+        //     },
+        // },
 
-        //销售交易信息审核
-        {
-            path: 'saletransactioninformationreview',
-            component: () =>
-                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/saletransactioninformationreview'),
-            name: 'saletransactioninformationreview',
-            meta: {
-                title: 'saletransactioninformationreview',
-                shortcutEntrance: 'saletransactioninformationreview',
-                module: 'audit.tranMerchant.tranMerchantInfo',
-                permissicon: [],
-                keepAlive: true,
-                _title: '销售信息审核'
-            },
-        },
-        //粮脉企业审核
-        {
-            path: 'grainpulseenterprisereview',
-            component: () =>
-                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/grainpulseenterprisereview'),
-            name: 'grainpulseenterprisereview',
-            meta: {
-                title: 'grainpulseenterprisereview',
-                shortcutEntrance: 'grainpulseenterprisereview',
-                module: 'audit.tranMerchant.tranMerchantInfo',
-                permissicon: [],
-                keepAlive: true,
-                _title: '粮脉企业审核'
-            },
-        },
-        //粮脉动态审核
-        {
-            path: 'grainPulseDynamic',
-            component: () =>
-                import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/grainPulseDynamic'),
-            name: 'grainPulseDynamic',
-            meta: {
-                title: 'grainPulseDynamic',
-                shortcutEntrance: 'grainPulseDynamic',
-                module: 'audit.grainMerchant.grainMerchantInfo.review',
-                permissicon: [],
-                keepAlive: true,
-                _title: '粮脉动态审核'
-            },
-        },
+        // //销售交易信息审核
+        // {
+        //     path: 'saletransactioninformationreview',
+        //     component: () =>
+        //         import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/saletransactioninformationreview'),
+        //     name: 'saletransactioninformationreview',
+        //     meta: {
+        //         title: 'saletransactioninformationreview',
+        //         shortcutEntrance: 'saletransactioninformationreview',
+        //         module: 'audit.tranMerchant.tranMerchantInfo',
+        //         permissicon: [],
+        //         keepAlive: true,
+        //         _title: '销售信息审核'
+        //     },
+        // },
+        // //粮脉企业审核
+        // {
+        //     path: 'grainpulseenterprisereview',
+        //     component: () =>
+        //         import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/grainpulseenterprisereview'),
+        //     name: 'grainpulseenterprisereview',
+        //     meta: {
+        //         title: 'grainpulseenterprisereview',
+        //         shortcutEntrance: 'grainpulseenterprisereview',
+        //         module: 'audit.tranMerchant.tranMerchantInfo',
+        //         permissicon: [],
+        //         keepAlive: true,
+        //         _title: '粮脉企业审核'
+        //     },
+        // },
+        // //粮脉动态审核
+        // {
+        //     path: 'grainPulseDynamic',
+        //     component: () =>
+        //         import ( /* webpackChunkName: "applDetail" */ '@/views/platformaudit/grainPulseDynamic'),
+        //     name: 'grainPulseDynamic',
+        //     meta: {
+        //         title: 'grainPulseDynamic',
+        //         shortcutEntrance: 'grainPulseDynamic',
+        //         module: 'audit.grainMerchant.grainMerchantInfo.review',
+        //         permissicon: [],
+        //         keepAlive: true,
+        //         _title: '粮脉动态审核'
+        //     },
+        // },
     ],
 };
 export default platformauditRouter;

+ 5 - 5
src/views/profitable/cashout.vue

@@ -43,7 +43,7 @@
             </el-select>
           </el-form-item>
            <el-form-item label-width='100px' v-if='deptBudgetList.purpose=="库点费用"' label="仓库名称" span="1" prop="contractNo" class="readonly">
-            <el-select v-model="deptBudgetList.warehouseName" placeholder="选择仓库" class="typeselect" @change="selectwarehouse">
+            <el-select v-model="deptBudgetList.warehouseName" filterable placeholder="选择仓库" class="typeselect" @change="selectwarehouse">
               <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
                 style="color: #8890b1" />
             </el-select>
@@ -102,7 +102,7 @@
         <el-table ref="tableref" v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.purpose=="库点费用"&&mode!="暂不分配"&&deptBudgetList.flag!="是"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
           <el-table-column v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
-              <el-select v-model="scope.row.warehouseName" placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
+              <el-select v-model="scope.row.warehouseName" filterable placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
                   style="color: #8890b1" />
               </el-select>
@@ -110,10 +110,10 @@
           </el-table-column>
           <el-table-column v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="日期">
             <template slot-scope="scope">
-               <ws-select v-model="scope.row.receiptDocDate" placeholder="选择日期" @change="((value)=>{selecttime(value, scope.row,scope.$index)})">
-                <ws-option v-for="item in datelist[scope.$index]" :key="item.time" :label="item.time" :value="item.time"
+               <el-select v-model="scope.row.receiptDocDate" filterable placeholder="选择日期" @change="((value)=>{selecttime(value, scope.row,scope.$index)})">
+                <el-option v-for="item in datelist[scope.$index]" :key="item.time" :label="item.time" :value="item.time"
                   style="color: #8890b1" />
-              </ws-select>
+              </el-select>
             </template>
           </el-table-column>
           <el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="日期">

+ 33 - 5
src/views/profitable/expenseallot.vue

@@ -67,7 +67,7 @@
         合计分配:{{amount}}元
         </div>
         <el-table ref="tableref" v-if='deptBudgetList.expensesPurpose==1&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.expensesPurpose==3&&mode!="暂不分配"||deptBudgetList.expensesPurpose==2&&mode!="暂不分配"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
-          <el-table-column v-if='deptBudgetList.expensesPurpose==1||deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
+          <el-table-column v-if='deptBudgetList.expensesPurpose==1' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select v-model="scope.row.warehouseName" placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -75,7 +75,15 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==1||deptBudgetList.expensesPurpose==2' prop="date" label="日期">
+          <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
+            <template slot-scope="scope">
+              <el-select  @change="((value)=>{receiptDocDatechange1(value, scope.$index)})" v-model="scope.row.warehouseName" placeholder="选择仓库">
+                <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
+                  style="color: #8890b1" />
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column v-if='deptBudgetList.expensesPurpose==1' prop="date" label="日期">
             <template slot-scope="scope">
                <ws-select v-model="scope.row.receiptDocDate" placeholder="选择日期" @change="((value)=>{selecttime(value, scope.row,scope.$index)})">
                 <ws-option v-for="item in datelist[scope.$index]" :key="item.time" :label="item.time+item.goodsSource" :value="item.time"
@@ -83,15 +91,19 @@
               </ws-select>
             </template>
           </el-table-column>
+          <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="date" label="日期">
+            <template slot-scope="scope">
+                <el-date-picker @change="((value)=>{receiptDocDatechange1(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
+              value-format="yyyy-MM-dd"   ></el-date-picker>
+            </template>
+          </el-table-column>
           <el-table-column v-if='deptBudgetList.expensesPurpose==3' prop="date" label="日期">
             <template slot-scope="scope">
                 <el-date-picker @change="((value)=>{receiptDocDatechange(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="goodsSource" label="货源">
-            </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==3' prop="date" label="货源">
+          <el-table-column v-if='deptBudgetList.expensesPurpose==3||deptBudgetList.expensesPurpose==2' prop="date" label="货源">
               <template slot-scope="scope">
                 <!-- {{scope.row.goodsourcelist}} -->
                 <el-select v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
@@ -299,6 +311,22 @@
              this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
           })
       },
+      receiptDocDatechange1(e,index){
+        var arr=[]
+        this.goodsourcelist[index]=[]
+        if(this.feeDetailsDistributions[index].warehouseName&&this.feeDetailsDistributions[index].receiptDocDate){
+          getwarehousingorder({warehouseName:this.feeDetailsDistributions[index].warehouseName,receiptDocDate:this.feeDetailsDistributions[index].receiptDocDate}).toPromise()
+          .then(response => {
+            for (let i = 0; i < response.length; i++) {
+              arr.push({goodsSource:response[i].goodsSource,id:response[i].id,weight:response[i].inWarehouseWeight,goodsName:response[i].goodsName,goodsNameKey:response[i].goodsNameKey})
+            }
+            this.feeDetailsDistributions[index].goodsSource=''
+            this.feeDetailsDistributions[index].weight=''
+             this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
+          })
+        }
+        
+      },
       returnsales(){
         this.$router.go(-1)
       },

+ 3 - 3
src/views/profitable/expensemanagementdetails.vue

@@ -124,11 +124,11 @@
                 <el-button v-if='scope.row.status=="待确认"&&scope.row.expensesType==1' @click="shoukuanqueren(scope.row)" type="primary">确认</el-button>
               </div>
               <!-- <el-button v-if='scope.row.approveStatus=="待确认"' @click="accomplish(scope.row)" type="primary">完成</el-button> -->
-              <el-button v-if='scope.row.expensesPurpose==1&&scope.row.status=="已收款"&&!scope.row.approveStatus||scope.row.expensesPurpose==1&&scope.row.status=="已付款"&&!scope.row.approveStatus' @click="accomplish(scope.row)" type="primary">完成</el-button>
+              <el-button v-if='scope.row.expensesPurpose==1&&scope.row.status=="已收款"&&!scope.row.approveStatus||scope.row.expensesPurpose==1&&scope.row.status=="已付款"&&!scope.row.approveStatus||scope.row.expensesPurpose==2&&scope.row.status=="已付款"&&!scope.row.approveStatus' @click="accomplish(scope.row)" type="primary">完成</el-button>
               <el-button  v-if='scope.row.status=="已驳回"' @click="edit(scope.row)" type="primary">编辑</el-button>
               <!-- <el-button v-if='scope.row.status=="已驳回"' @click="expenseedit(scope.row)" type="primary">编辑</el-button> -->
               <el-button v-if='!scope.row.distributionStatus&&scope.row.expensesPurpose==1&&scope.row.costType==3&&!scope.row.approveStatus&&scope.row.status=="已付款"
-              ||!scope.row.distributionStatus&&scope.row.expensesPurpose==3&&!scope.row.approveStatus&&scope.row.status=="已付款"&&scope.row.storageFeeFlag!=1||scope.row.expensesPurpose==2&&scope.row.status=="已付款"' @click="allot(scope.row)" type="primary">分配</el-button>
+              ||!scope.row.distributionStatus&&scope.row.expensesPurpose==3&&!scope.row.approveStatus&&scope.row.status=="已付款"&&scope.row.storageFeeFlag!=1||scope.row.expensesPurpose==2&&scope.row.status=="已付款"&&!scope.row.distributionStatus' @click="allot(scope.row)" type="primary">分配</el-button>
               <!-- <el-button v-if='scope.row.approveStatus=="已驳回"' @click="del(0,scope.row)" type="primary">删除</el-button> -->
               <el-button v-if='scope.row.status=="已驳回"' @click="del(0,scope.row)" type="danger">删除</el-button>
               <el-button v-if='scope.row.approveStatus=="待财务审核"||scope.row.approveStatus=="待决策人审核"||scope.row.approveStatus=="待内勤审核"' @click="aduit(scope.row)" type="primary">审核</el-button>
@@ -138,7 +138,7 @@
           <el-table-column prop="expenseRemarks" label="分配状态">
             <template slot-scope="scope">
               <span>{{scope.row.distributionStatus}}</span>
-              <el-tooltip v-if='scope.row.rejectionReason' class="item" effect="dark" :content="scope.row.rejectionReason" placement="top-start">
+              <el-tooltip v-if='scope.row.rejectionReason&&scope.row.distributionStatus' class="item" effect="dark" :content="scope.row.rejectionReason" placement="top-start">
                 <i class="el-icon-question"></i>
               </el-tooltip>
             </template>

+ 47 - 6
src/views/profitable/expensemanagentedit.vue

@@ -95,7 +95,7 @@
         <span v-if='mode!="暂不分配"'>合计分配:{{amount}}元</span>  
         </div>
         <el-table ref="tableref" v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"&&mode!="暂不分配"||deptBudgetList.purpose=="库点费用"&&mode!="暂不分配"||deptBudgetList.expensesPurpose==2&&mode!="暂不分配"' :data="feeDetailsDistributions" style="width: 90%;margin:0 auto;">
-          <el-table-column v-if='deptBudgetList.purpose=="合同费用"||deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
+          <el-table-column v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="仓库名称" min-width="110">
             <template slot-scope="scope">
               <el-select v-model="scope.row.warehouseName" placeholder="选择仓库" @change="((value)=>{selectware(value, scope.$index)})">
                 <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
@@ -103,7 +103,15 @@
               </el-select>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="合同费用"||deptBudgetList.expensesPurpose==2' prop="date" label="日期">
+          <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="date" label="仓库名称" min-width="110">
+            <template slot-scope="scope">
+              <el-select  @change="((value)=>{receiptDocDatechange1(value, scope.$index)})" v-model="scope.row.warehouseName" placeholder="选择仓库">
+                <el-option v-for="item in warehouseList" :key="item.warehouseName" :label="item.warehouseName" :value="item.warehouseName"
+                  style="color: #8890b1" />
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column v-if='deptBudgetList.purpose=="合同费用"' prop="date" label="日期">
             <template slot-scope="scope">
                <ws-select v-model="scope.row.receiptDocDate" placeholder="选择日期" @change="((value)=>{selecttime(value, scope.row,scope.$index)})">
                 <ws-option v-for="item in datelist[scope.$index]" :key="item.time" :label="item.time+'/'+item.goodsSource" :value="item.time"
@@ -117,9 +125,13 @@
               value-format="yyyy-MM-dd"   ></el-date-picker>
             </template>
           </el-table-column>
-          <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="goodsSource" label="货源">
-            </el-table-column>
-          <el-table-column v-if='deptBudgetList.purpose=="库点费用"' prop="date" label="货源">
+          <el-table-column v-if='deptBudgetList.expensesPurpose==2' prop="date" label="日期">
+            <template slot-scope="scope">
+                <el-date-picker @change="((value)=>{receiptDocDatechange1(value, scope.$index)})" v-model="scope.row.receiptDocDate" type="date" placeholder="请选择日期"
+              value-format="yyyy-MM-dd"   ></el-date-picker>
+            </template>
+          </el-table-column>
+          <el-table-column v-if='deptBudgetList.purpose=="库点费用"||deptBudgetList.expensesPurpose==2' prop="date" label="货源">
               <template slot-scope="scope">
                 <!-- {{scope.row.goodsourcelist}} -->
                 <el-select v-model="scope.row.orderId" placeholder="选择货源" @change="((value)=>{selectgoodsSource(value, scope.row,scope.$index)})">
@@ -330,6 +342,22 @@ weight: 4000}]],
              this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
           })
       },
+      receiptDocDatechange1(e,index){
+        var arr=[]
+        this.goodsourcelist[index]=[]
+        if(this.feeDetailsDistributions[index].warehouseName&&this.feeDetailsDistributions[index].receiptDocDate){
+          getwarehousingorder({warehouseName:this.feeDetailsDistributions[index].warehouseName,receiptDocDate:this.feeDetailsDistributions[index].receiptDocDate}).toPromise()
+          .then(response => {
+            for (let i = 0; i < response.length; i++) {
+              arr.push({goodsSource:response[i].goodsSource,id:response[i].id,weight:response[i].inWarehouseWeight,goodsName:response[i].goodsName,goodsNameKey:response[i].goodsNameKey})
+            }
+            this.feeDetailsDistributions[index].goodsSource=''
+            this.feeDetailsDistributions[index].weight=''
+             this.$set(this.goodsourcelist,index,JSON.parse(JSON.stringify(arr)))
+          })
+        }
+        
+      },
       selectcontent(e){
 
       },
@@ -394,6 +422,9 @@ weight: 4000}]],
             this.deptBudgetList.costType=5
             this.deptBudgetList.expenseAllocationInfoList=[]
           }
+        }
+        if(this.deptBudgetList.expensesPurpose==2){
+          this.deptBudgetList.expenseAllocationInfoList=this.feeDetailsDistributions
         }
          if(this.deptBudgetList.expensesPurpose==1||this.deptBudgetList.expensesPurpose==2){
         var data=[]
@@ -502,6 +533,7 @@ weight: 4000}]],
         }
         this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
         this.deptBudgetList.flag=3
+        console.log(this.deptBudgetList)
         editexenseinfo(this.deptBudgetList).toPromise()
           .then(response => {
             this.$message({
@@ -626,7 +658,7 @@ weight: 4000}]],
                     id:data[q].id,weight:data[q].inWarehouseWeight,goodsName:data[q].goodsName,goodsNameKey:data[q].goodsNameKey})
                 }
                 this.$set(this.goodsourcelist,i,JSON.parse(JSON.stringify(arr)))
-              }else if(this.deptBudgetList.expensesPurpose==1||this.deptBudgetList.expensesPurpose==2){
+              }else if(this.deptBudgetList.expensesPurpose==1){
                 const data  = await getwarehousingorder({contractNo:this.deptBudgetList.contractNo,warehouseName:this.feeDetailsDistributions[i].warehouseName}).toPromise()
                 this.datelist[i]=[]
                 for (let q = 0; q < data.length; q++) {
@@ -634,6 +666,15 @@ weight: 4000}]],
                   arr.push({time:data[i].issuingDate,id:data[i].id,weight:data[i].inWarehouseWeight,goodsSource:data[i].goodsSource})
                 }
                 this.$set(this.datelist,i,JSON.parse(JSON.stringify(arr)))
+              }else if(this.deptBudgetList.expensesPurpose==2){
+                const data  = await getwarehousingorder({receiptDocDate:this.feeDetailsDistributions[i].receiptDocDate,warehouseName:this.feeDetailsDistributions[i].warehouseName}).toPromise()
+                this.datelist[i]=[]
+                for (let q = 0; q < data.length; q++) {
+                  arr.push({
+                    goodsSource:data[q].goodsSource,
+                    id:data[q].id,weight:data[q].inWarehouseWeight,goodsName:data[q].goodsName,goodsNameKey:data[q].goodsNameKey})
+                }
+                this.$set(this.goodsourcelist,i,JSON.parse(JSON.stringify(arr)))
               }
             }
             console.log(this.goodsourcelist,this.datelist)

+ 4 - 0
src/views/profitable/expensemanagentlook.vue

@@ -147,6 +147,10 @@
         makeWordData: {},
         srcList:[],
         expensesType:'',
+        goodsourcelist:[],
+        warehouseList:[],
+        dataList:[],
+        datelist:[],
         compId:localStorage.getItem('ws-pf_compId'),
         roleName:localStorage.getItem('ws-pf_roleName'),
         payeeinfo:{},

+ 28 - 6
src/views/statisticalReport/autoSettlementList.vue

@@ -44,7 +44,7 @@
       <el-row>
         <div style="color:red">注:审核时,同一运输阶段勾选任意复选框,当前运输阶段下所有条目都通过审核!</div>
       </el-row>
-      <el-table class="wenzi" :data="warehouseList.records" style="width: 100%; margin-top: 20px" ref="warehouseList" :summary-method="getSummaries" show-summary @row-click="handleRowClick"
+      <el-table class="wenzi" :data="warehouseList.records" style="width: 100%; margin-top: 20px" ref="warehouseList"   @row-click="handleRowClick"
         @selection-change="handleSelectionChange">
         <el-table-column :selectable="selectInit" type="selection" width="55"></el-table-column>
         <el-table-column type="index" label="序号" width="50"></el-table-column>
@@ -219,7 +219,7 @@
           <el-input type='number' v-model="money" autocomplete="off" placeholder="请输入本次付款金额" class="deal"></el-input>
         </el-form-item>
         <el-form-item label="付款日期" prop="paymentDate" :label-width="formLabelWidth" class="deal">
-          <ws-date-picker v-model="paymentDate" type="date" placeholder="请选择付款日期" value-format="yyyy-MM-dd"
+          <el-date-picker v-model="paymentDate" type="date" placeholder="请选择付款日期" value-format="yyyy-MM-dd"
             class="deal" />
         </el-form-item>
         <el-form-item label="上传付款截图" :label-width="formLabelWidth">
@@ -544,6 +544,16 @@ export default {
         }
       }
     },
+    date() {
+      var date = new Date();
+      var y = date.getFullYear();
+      var m = date.getMonth() + 1;
+      var d = date.getDate();
+
+      m = m < 10 ? "0" + m : m;
+      d = d < 10 ? "0" + d : d;
+      return y + "-" + m + "-" + d;
+    },
     selectInit(row) {
       //在这里一定要记得类型匹配的上。
       if (row.approveStatus == null) {
@@ -588,7 +598,7 @@ export default {
       // this.money = this.money
       this.tranSettlementReportList = this.warehouseList.records[0].tranSettlementReportList
       this.amountEdPayable = this.warehouseList.records[0].amountEdPayable
-      this.paymentDate = this.paymentDate
+      this.paymentDate = this.date()
       if (this.modification.length == 0) {
         this.$message.warning('请选择一条要付款的条目')
       } else {
@@ -610,6 +620,7 @@ export default {
             return
         }
         this.amountNotPayable = this.amountNotPayable.toFixed(2)
+        this.money=this.amountNotPayable
         this.dialogFormVisible1 = true
       }
     },
@@ -654,6 +665,17 @@ export default {
           })
           return
         }
+        if(!this.deptBudgetList.addressUrl){
+          // var arr=this.deptBudgetList.addressUrl.split(',')
+          // if(arr.length==0){
+            this.$message({
+              message: '请上传付款截图!',
+              type: 'warning',
+            })
+            return
+          // }
+        }
+        
         this.$confirm(`确定提交付款信息?`, {
           cancelButtonText: '取消',
           confirmButtonText: '确定',
@@ -872,7 +894,7 @@ export default {
           (String(this.deductionAmount).indexOf('.') + 1) >
           2) ||
         (this.deductionAmount && this.deductionAmount > 100000) ||
-        (this.deductionAmount && this.deductionAmount < 0)
+        (this.deductionAmount && this.deductionAmount < -100000)
       ) {
         this.$message({
           message: '扣款金额输入错误',
@@ -881,7 +903,7 @@ export default {
         return
       }
       editauto({
-        deductionAmount: Math.abs(this.deductionAmount),
+        deductionAmount: this.deductionAmount,
         id: item.id,
         flag: 1,
       })
@@ -1011,7 +1033,7 @@ export default {
         this.$message.warning('请选择要通过的条目')
       } else {
         for (let i = 0; i < this.modification.length; i++) {
-          if(this.modification[i].status=='待请款'&&this.modification[i].approveStatus||this.modification[i].status!='待请款'){
+          if(this.modification[i].status=='待请款'&&this.modification[i].approveStatus||this.modification[i].status!='待请款'&&this.modification[i].status!='已驳回'){
             this.$message.warning('请选择待请款的条目')
             return
           }