Browse Source

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

ccj 3 năm trước cách đây
mục cha
commit
3003725dfd

+ 6 - 0
src/api/V2/houseSelfCollect/index.js

@@ -48,4 +48,10 @@ export const API_GET_WEIGHTCHECK_GETWEIGHINGLIST = '/weighingManagement/selectWe
 export const API_POST_WEIGHTCHECK_TARE= '/weighingManagement/api/editTare'
 //毛重重检斤保存
 export const API_POST_WEIGHTCHECK_GROSSWEIGHT = '/weighingManagement/api/editGrossWeight'
+//质检客户下拉校验
+export const API_GET_INSPECT_GETAMOUNT = '/paymentManagement/cumulant'
+
+//识别身份证
+export const API_GET_CUSTOMER_GETIDENTITY = '/driverViewInfo/personShibie'
+
 

+ 8 - 0
src/api/V2/outboundManagement/index.js

@@ -0,0 +1,8 @@
+//质检列表
+export const API_GET_INSPECT_GETINSPECTLIST = '/qualityInspectionManagement/selectQualityInspection'
+//质检查看
+export const API_GET_INSPECT_GETINSPECTLOOK = '/qualityInspectionManagement/api/getQualityInspection'
+//质检添加
+export const API_POST_INSPECT_ADDOUT = '/qualityInspectionManagement/api/addQualityInspectionOut'
+//查询仓库列表
+export const API_GET_WAREHOUSESELF = '/warehouseBaseInfo/selectWarehouseSelf'

+ 4 - 3
src/lang/zh.js

@@ -1,4 +1,4 @@
-export default {
+export default {
   logoName: '船舶管理平台',
   tip: '提示',
   title: 'WinSea企业级开发平台',
@@ -993,7 +993,7 @@
     paymentManagement:'付款管理',
     weighingManagement:'检斤管理',
     houseSelfCollectPrint:'查看',
-    acquisitionManagementAdd:'收购管理新增',
+    acquisitionManagementAdd:'收购管理',
     acquisitionManagementEdit:'收购管理编辑',
     customerManagementEdit:'客户管理编辑',
     customerManagementAdd:'客户管理添加',
@@ -1005,6 +1005,7 @@
     outboundManagement: '出库管理',
     weighingManagement: '检斤管理',
     qualityInspectionManagement: '质检管理',
+    qualityInspection: '质检信息',
     collectionManagement: '收款管理',
 
   },
@@ -7423,7 +7424,6 @@
   houseSelfCollect:{
     customerManagement:'客户管理',
     acquisitionManagement:'仓库设置',
-    acquisitionManagementAdd:'收购管理新增',
     acquisitionManagementEdit:'收购管理编辑',
     inspectionManagement:'质检管理',
     paymentManagement:'付款管理',
@@ -7440,6 +7440,7 @@
   outboundManagement: {
     weighingManagement: '检斤管理',
     qualityInspectionManagement: '质检管理',
+    qualityInspection:'质检信息',
     collectionManagement: '收款管理',
   }
      

+ 8 - 1
src/model/houseSelfCollect/index.js

@@ -26,7 +26,9 @@ import {
   API_POST_INSPECT_GETINSPECTDELETE,
   API_GET_WEIGHTCHECK_GETWEIGHINGLIST,
   API_POST_WEIGHTCHECK_GROSSWEIGHT,
-  API_POST_WEIGHTCHECK_TARE
+  API_POST_WEIGHTCHECK_TARE,
+  API_GET_INSPECT_GETAMOUNT,
+  API_GET_CUSTOMER_GETIDENTITY
 
 } from '@/api/V2/houseSelfCollect'
 //客户管理列表
@@ -80,3 +82,8 @@ export const getweighingList = appRx.get(API_GET_WEIGHTCHECK_GETWEIGHINGLIST, er
 export const tare = appRx.post(API_POST_WEIGHTCHECK_TARE, errorCatcher, errorHandle, filter)
 //毛重检斤保存
 export const grossWeight = appRx.post(API_POST_WEIGHTCHECK_GROSSWEIGHT, errorCatcher, errorHandle, filter)
+//质检客户下拉校验
+export const getamount = appRx.get(API_GET_INSPECT_GETAMOUNT, errorCatcher, errorHandle, filter)
+
+//身份证识别
+export const getIdentity  = appRx.get(API_GET_CUSTOMER_GETIDENTITY, errorCatcher, errorHandle, filter)

+ 15 - 2
src/model/outboundManagement/index.js

@@ -2,6 +2,19 @@ import { errorCatcher, errorHandle, filter } from 'base-core-lib'
 import { appRx } from '../defalutConfig/indexRx'
 
 import {
-  
+    API_POST_INSPECT_ADDOUT,
+    API_GET_INSPECT_GETINSPECTLIST,
+    API_GET_INSPECT_GETINSPECTLOOK,
+    API_GET_WAREHOUSESELF
+
+}   from '@/api/V2/outboundManagement'
 
-} from '@/api/V2/outboundManagement'
+  //质检列表
+  export const getinspectList = appRx.get(API_GET_INSPECT_GETINSPECTLIST, errorCatcher, errorHandle, filter)
+  //质检查看
+  export const getinspectLook = appRx.get(API_GET_INSPECT_GETINSPECTLOOK, errorCatcher, errorHandle, filter)
+  //质检添加
+  export const addOut = appRx.post(API_POST_INSPECT_ADDOUT, errorCatcher, errorHandle, filter)
+  //查看仓库
+  export const selectWarehouseSelf = appRx.get(API_GET_WAREHOUSESELF, errorCatcher, errorHandle, filter)
+  

+ 90 - 31
src/views/houseSelfCollect/acquisitionManagement.vue

@@ -7,7 +7,7 @@
           <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
           </el-option>
         </el-select>
-        <el-checkbox v-model="checked" @change="allowEdit">允许手动编辑重量</el-checkbox>
+        <el-checkbox v-model="checked" @change="allowEdit" :disabled="userJurisdiction">允许手动编辑重量</el-checkbox>
       </div>
       <el-button type="primary" @click="newAcquisition('','','新增')">新增</el-button>
     </div>
@@ -32,6 +32,8 @@
         <el-table-column prop="waterBase" label="基准水分(%)"></el-table-column>
         <el-table-column prop="deductWeight" label="扣重比"></el-table-column>
         <el-table-column prop="saleLimit" label="销量上线"></el-table-column>
+        <el-table-column prop="dryGrainPrice" label="干粮收购价"></el-table-column>
+
         <el-table-column prop="status" label="状态"></el-table-column>
         <el-table-column prop="passDate" label="通过时间"></el-table-column>
         <el-table-column label="操作" width="300">
@@ -47,13 +49,7 @@
         :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
         :total="deptBudgetTotal">
       </el-pagination>
-      <el-popover placement="center" width="160" v-model="visible">
-        <p>这是一段内容这是一段内容确定删除吗?</p>
-        <div style="text-align: right; margin: 0">
-          <el-button size="mini" type="text" @click="visible = false">取消</el-button>
-          <el-button type="primary" size="mini" @click="visible = false">确定</el-button>
-        </div>
-      </el-popover>
+
     </div>
   </div>
 </template>
@@ -62,9 +58,11 @@
     getPurchasePrice,
     selectWarehouseSelf,
     purchasePriceAllowEdit,
-    purchasePriceLook
+    purchasePriceLook,
+    purchasePriceDel
   } from '@/model/houseSelfCollect/index'
   import acquisitionManagementAdd from './acquisitionManagementAdd.vue'
+  import { getHp } from '@/utils/getHasPermission'
   export default {
 
     components: {
@@ -86,21 +84,29 @@
         accountName: '',
         tableData: [],
         selectVal: '',
-        goodsNameList:[],
-        warehouseList:[]
+        goodsNameList: [],
+        warehouseList: [],
+        userJurisdiction:false
       }
     },
-    activated() {},
-    computed() {},
-    created() {
+    activated() {
       //获取公司id
       this.compId = sessionStorage.getItem('ws-pf_compId')
       //用户名
       this.accountName = sessionStorage.getItem('ws-pf_staffName')
       this.getWarehouseSelf()
+      //获取用户权限,决策人、统计
+      this.getUserJurisdiction()
+    },
+    computed() {},
+    created() {
+
 
     },
     methods: {
+      getUserJurisdiction(){debugger
+        let userJurisdiction = getHp('acquisitionManagement.acquisition.allow')
+      },
       handleSizeChange(val) {
         console.log(`每页 ${val} 条`)
         this.pageSize = val
@@ -113,6 +119,20 @@
       },
       warehouseChange(e) {
         console.log(e)
+        let _obj = this.warehouseList.find((item) => {
+          return item.id === this.selectVal;
+        });
+        if (_obj.allowEdit == 1) {
+
+          this.checked = true
+        } else {
+          this.checked = false
+        }
+  this.currentPage=1
+   this.pageSize = 10
+        this.getList()
+        console.log(_obj)
+
       },
       newAcquisition(index, row, type) {
         let _obj = {}
@@ -128,14 +148,14 @@
               warehouseName: _obj.warehouseName,
               compId: this.compId,
               type: type,
-              goodsNameList:this.goodsNameList
+              goodsNameList: this.goodsNameList
             }
             break
           case '编辑':
             break
           case "查看":
             _query = {
-              data:JSON.stringify(row),
+              data: JSON.stringify(row),
               type: type
             }
             break
@@ -152,32 +172,44 @@
         selectWarehouseSelf({
           compId: this.compId,
           personCharge: this.accountName,
-        }).toPromise().then((response) => {
+        }).toPromise().then((response) => {debugger
           console.log(response)
           this.warehouseList = response
+          this.warehouseList.unshift({warehouseName:response[0].flag})
+          console.log(this.warehouseList)
           this.selectVal = this.warehouseList[0].id
+          if (this.warehouseList[0].allowEdit == 1) {
+
+            this.checked = true
+          } else {
+            this.checked = false
+          }
           // this.tableData = response.records
           this.getList()
         })
       },
       //获取列表数据
-      getList() {
+      getList() {debugger
         getPurchasePrice({
           currentPage: this.currentPage,
           pageSize: this.pageSize,
           warehouseId: this.selectVal,
           compId: this.compId,
+
         }).toPromise().then((response) => {
           console.log(response)
-          for(let i=0;i<response.records.length;i++){
+          for (let i = 0; i < response.records.length; i++) {
             this.goodsNameList.push(response.records[i].goodsName)
           }
           this.tableData = response.records
         })
       },
       allowEdit(val) {
-        console.log(val)
-        purchasePriceAllowEdit({}).toPromise().then((response) => {
+        console.log(this.selectVal)
+        purchasePriceAllowEdit({
+          warehouseId: this.selectVal
+        }).toPromise().then((response) => {
+
           console.log(response)
           // this.tableData = response.records
         })
@@ -185,19 +217,46 @@
       handleEdit(index, row) {
         console.log(index, row);
       },
+      // 删除
       delRow(index, row) {
-        this.visible = true
         console.log(index, row);
-      },
-      print(index,row) {
-      // 打印价格对照表
-     purchasePriceLook({id:row.id}).toPromise().then((response) => {
-            console.log(response.detailPrints)
-            // this.tableData = response.records
-            // this.getList()
-            localStorage.setItem('pricePrintList', JSON.stringify(response.detailPrints));
-            window.location.href="../../../static/print.html?name="+row.goodsName
+        //删除
+        this.$confirm('确定删除该条设置?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
           })
+          .then(() => {
+            purchasePriceDel({
+                id: row.id,
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '删除成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      print(index, row) {
+        // 打印价格对照表
+        purchasePriceLook({
+          id: row.id
+        }).toPromise().then((response) => {
+          console.log(response.detailPrints)
+          // this.tableData = response.records
+          // this.getList()
+          localStorage.setItem('pricePrintList', JSON.stringify(response.detailPrints));
+          window.location.href = "../../../static/print.html?name=" + row.goodsName
+        })
       }
     },
   }

+ 222 - 122
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -14,7 +14,6 @@
         <div class="row1">
           <div class="grid-content">
             <el-form-item label="货名">
-              <!-- <el-input v-model="baseInfoForm.goodsName"></el-input> -->
               <el-select v-model="selectVal" placeholder="请选择" @change="goodsChange">
                 <el-option v-for="item in goodnameList" :key="item.constValue" :label="item.constValue"
                   :value="item.constValue">
@@ -24,29 +23,34 @@
           </div>
           <div class="grid-content">
             <el-form-item label="基准水分(%)">
-              <el-input v-model="baseInfoForm.waterBase" @input="changeBaseWater"></el-input>
+              <el-input v-model="baseInfoForm.waterBase" @input="changeBaseWater" :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
           <div class="grid-content">
             <el-form-item label="扣重比">
-              <el-input v-model="baseInfoForm.deductWeight"></el-input>
+              <el-input v-model="baseInfoForm.deductWeight" :disabled="!isEdit"></el-input>
+            </el-form-item>
+          </div>
+          <div class="grid-content">
+            <el-form-item label="干粮收购价格">
+              <el-input v-model="baseInfoForm.dryGrainPrice" :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
         </div>
         <div class="row2">
           <div class="grid-content">
             <el-form-item label="干粮水分">
-              <el-input v-model="baseInfoForm.waterMin" @input="changeMinWater"></el-input>
+              <el-input v-model="baseInfoForm.waterMin" @input="changeMinWater" :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
           <div class="grid-content">
             <el-form-item label="水分上限">
-              <el-input v-model="baseInfoForm.waterMax" @input="changeMaxWater"></el-input>
+              <el-input v-model="baseInfoForm.waterMax" @input="changeMaxWater" :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
           <div class="grid-content">
             <el-form-item label="销售上限(年/吨)">
-              <el-input v-model="baseInfoForm.saleLimit"></el-input>
+              <el-input v-model="baseInfoForm.saleLimit" :disabled="!isEdit"></el-input>
             </el-form-item>
           </div>
         </div>
@@ -54,23 +58,23 @@
       <el-row class="row3">
         <div class="top">
           <div class="title">粮价设置</div>
-          <el-button class="btn" @click="newSetPrice">新增</el-button>
+          <el-button 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 class="text">基准单价(元/公斤)</div>
-              <el-input v-model="item.basicUnitPrice"></el-input>
+              <el-input v-model="item.basicUnitPrice" :disabled="!isEdit"></el-input>
             </div>
-            <el-button @click="delSetPrice(item,index)">删除</el-button>
+            <el-button @click="delSetPrice(item,index)" :disabled="!isEdit">删除</el-button>
           </div>
           {{item}}
           <div class="level">
             <el-checkbox-group v-model="item.checkList" @change="changeLevel($event,index)">
-              <el-checkbox label="一等"></el-checkbox>
-              <el-checkbox label="二等"></el-checkbox>
-              <el-checkbox label="三等"></el-checkbox>
-              <el-checkbox label="等外"></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 label="等外" :disabled="!isEdit"></el-checkbox>
             </el-checkbox-group>
           </div>
           <div class="count">
@@ -86,9 +90,10 @@
                 <div class="item-style">
                   <div v-if="item1.type!=4" class="item-style-title">
                     <span>{{item1.name}}{{item1.index}}</span>
-                    <span class="add" @click="add(item,item1,index)" v-if="item1.type!=3">+</span>
-                    <span class="reduce" @click="reduce(item,item1,index)"
-                      v-show="item1.type!=1&&item1.type!=2&&item1.type!=3">-</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" v-model="baseInfoForm.waterMin"
@@ -103,7 +108,7 @@
                   <div class="circle" v-if="item1.type!=4"></div>
                 </div>
                 <div class="bottom-price">
-                  <input v-if="item1.type==4" class="water-price" v-model="item1.jfprice"></input>
+                  <input v-if="item1.type==4" class="water-price" v-model="item1.jfprice" :disabled="!isEdit"></input>
                 </div>
               </div>
             </div>
@@ -158,38 +163,38 @@
       return {
         selectVal: "",
         goodnameList: [],
-        tableData: [{
-          waterMin: '10',
-          waterMax: '20',
-          price1: '30',
-          price2: '30',
-          price3: '30',
-          priceOther: '30',
-        }, {
-          waterMin: '11',
-          waterMax: '20',
-          price1: '30',
-          price2: '30',
-          price3: '30',
-          priceOther: '30',
-        }, {
-          waterMin: '12',
-          waterMax: '20',
-          price1: '30',
-          price2: '30',
-          price3: '30',
-          priceOther: '30',
-        }, {
-          waterMin: '13',
-          waterMax: '20',
-          price1: '30',
-          price2: '30',
-          price3: '30',
-          priceOther: '30',
-        }],
+        tableData: [],
+        // tableData: [{
+        //   waterMin: '10',
+        //   waterMax: '20',
+        //   price1: '30',
+        //   price2: '30',
+        //   price3: '30',
+        //   priceOther: '30',
+        // }, {
+        //   waterMin: '11',
+        //   waterMax: '20',
+        //   price1: '30',
+        //   price2: '30',
+        //   price3: '30',
+        //   priceOther: '30',
+        // }, {
+        //   waterMin: '12',
+        //   waterMax: '20',
+        //   price1: '30',
+        //   price2: '30',
+        //   price3: '30',
+        //   priceOther: '30',
+        // }, {
+        //   waterMin: '13',
+        //   waterMax: '20',
+        //   price1: '30',
+        //   price2: '30',
+        //   price3: '30',
+        //   priceOther: '30',
+        // }],
         isCountShow: true,
         priceList: [{
-          unitPrice: '',
           index: 0,
           checkList: [],
           basicUnitPrice: "",
@@ -238,6 +243,7 @@
           workflowId: '',
           approveStatus: '',
           passDate: '',
+          dryGrainPrice: '',
           details: [],
           detailPrints: []
         },
@@ -249,16 +255,16 @@
     activated() {
       switch (this.$route.query.type) {
         case "新增":
-        let _goodsNameList = []
-        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
-        console.log(this.baseInfoForm)
-        _goodsNameList = this.$route.query.goodsNameList
-        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
+          let _goodsNameList = []
+          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
+          console.log(this.baseInfoForm)
+          _goodsNameList = this.$route.query.goodsNameList
+          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
           // 货名
           packList({
               constId: 'CON2'
@@ -285,12 +291,18 @@
         case "编辑":
           break;
         case "查看":
-         this.baseInfoForm =JSON.parse(this.$route.query.data)
-       purchasePriceLook({id:this.baseInfoForm.id}).toPromise().then((response) => {
-              console.log(response)
-              // this.tableData = response.records
-              // this.getList()
-            })
+          this.isEdit = false;
+          this.type = this.$route.query.type
+          this.baseInfoForm = JSON.parse(this.$route.query.data)
+          purchasePriceLook({
+            id: this.baseInfoForm.id
+          }).toPromise().then((response) => {
+            console.log(response)
+            this.baseInfoForm = response
+            //构造查看priceList数据
+            this.priceList = []
+            this.makeLookPriceList()
+          })
           break;
         default:
           break
@@ -331,6 +343,7 @@
           }
         }
       },
+      // 设置表格颜色
       tableRowClassName({
         row,
         rowIndex
@@ -410,6 +423,7 @@
         } catch (e) {}
         return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m)
       },
+      //保留两位小数
       keepTwoDecimal(num) {
         var result = parseFloat(num);
         if (isNaN(result)) {
@@ -419,9 +433,9 @@
         result = Math.round(result * 100) / 100;
         return result;
       },
+      // 添加粮价设置
       newSetPrice() {
         let _newObj = {
-          unitPrice: '',
           index: 0,
           checkList: [],
           detailList: [{
@@ -471,7 +485,6 @@
             return false
           })
       },
-
       //构造新增价格数据
       makePriceDataList() {
         for (let k = 0; k < this.priceList.length; k++) {
@@ -512,42 +525,32 @@
 
         }
       },
-
       //打印
-      print() {
-
-      },
+      print() {},
       // 提交
       submit() {
         this.isCountShow = false
         this.makeTableList()
         this.makePriceDataList()
         this.baseInfoForm.goodsName = this.selectVal
-        purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
-          console.log(response)
-          // this.tableData = response.records
-        })
+        // purchasePriceAdd(this.baseInfoForm).toPromise().then((response) => {
+        //   console.log(response)
+        //   this.tableData = response.records
+        // })
       },
+      // 关闭
       closeCount() {
         this.isCountShow = true
-        this.splitPriceList = []
-        this.$router.push({
-          name: 'acquisitionManagement',
-        })
+        // this.splitPriceList = []
+        // this.$router.push({
+        //   name: 'acquisitionManagement',
+        // })
       },
-      //处理表格数据
+      //处理价格表格数据
       makeTableList() {
-        // this.tableData
-        //水分下限
-        // this.baseInfoForm.waterMin
-        // 水分上限
-        // this.baseInfoForm.waterMax
-        // price1
-
         // 获取等级对应分界钱数
         this.getSplitPrice()
-        // 分界价钱数据
-        // this.splitPriceList
+        // 构造表格等差数列
         let _list = []
         let _obj = {}
         let _waterMin = parseFloat(this.baseInfoForm.waterMin)
@@ -581,9 +584,8 @@
         }
         this.tableData = _list
       },
-      // 获取分界价格数据
+      // 获取分界价格数据,构造分界价格区间数据
       getSplitPrice() {
-
         let _priceList = this.priceList
         for (let i = 0; i < _priceList.length; i++) {
           for (let k = 0; k < _priceList[i].checkList.length; k++) {
@@ -598,6 +600,7 @@
               }
               if (_priceList[i].detailList[j].type != 4 && _priceList[i].detailList[j].type != 3) {
                 _obj.priceList.push({
+                  index: j,
                   type: parseFloat(_priceList[i].detailList[j].type),
                   priceStart: parseFloat(_priceList[i].detailList[j].water),
                   priceEnd: parseFloat(_priceList[i].detailList[j + 2].water),
@@ -609,13 +612,56 @@
             }
             console.log(_obj)
             this.splitPriceList.push(_obj)
-
             console.log(this.splitPriceList)
           }
         }
       },
-      getOtherPrice(list) {
-
+      // 获取当前价格左右价格区间数据
+      getOtherPrice(list, nowList, direction) {
+        //判断当前价格左右各有几个分界,返回当前除当前分界其他分界价格和
+        let _left = []
+        let _right = []
+        let _leftTotalPrice = 0
+        let _rightTotalPrice = 0
+        //当前分界左边价格
+        if (direction == "leftBasic") {
+          for (let i = 0; i < list.length; i++) {
+            if (nowList.index <= list[i].index && list[i].priceStart < 30) {
+              _right.push(list[i])
+            } else if (list[i].priceStart < 30) {
+              _left.push(list[i])
+            }
+          }
+          if (_left.length > 0) {
+            for (let j = 0; j < _left.length; j++) {
+              _leftTotalPrice += _left[j].totalPrice
+            }
+          }
+          if (_right.length > 0) {
+            for (let k = 0; k < _right.length; k++) {
+              _rightTotalPrice += _right[k].totalPrice
+            }
+          }
+        } else {
+          for (let m = 0; m < list.length; m++) {
+            if (nowList.index <= list[m].index && list[m].priceStart > 30) {
+              _left.push(list[m])
+            } else if (list[m].priceStart > 30) {
+              _right.push(list[m])
+            }
+          }
+        }
+        if (_left.length > 0) {
+          for (let j = 0; j < _left.length; j++) {
+            _leftTotalPrice += _left[j].totalPrice
+          }
+        }
+        if (_right.length > 0) {
+          for (let k = 0; k < _right.length; k++) {
+            _rightTotalPrice += _right[k].totalPrice
+          }
+        }
+        return _leftTotalPrice + _rightTotalPrice
       },
       // 计算价格
       calculatePrice(_waterMin) {
@@ -631,6 +677,7 @@
           for (let k = 0; k < _list.length; k++) {
             //基准左边
             if (_waterMin < parseFloat(this.baseInfoForm.waterBase)) {
+              // 未设置分界
               if (_waterMin >= _list[k].priceStart && _waterMin < _list[k].priceEnd && !this.splitPriceList[i]
                 .haveSplit) {
                 console.log(basePrice)
@@ -638,56 +685,104 @@
                 console.log(this.keepTwoDecimal(((parseFloat(this.baseInfoForm.waterBase) - _waterMin) / 0.5) * _list[k]
                   .betweenPrice))
                 _price = basePrice + (parseFloat(this.baseInfoForm.waterBase) - _waterMin) / 0.5 * _list[k]
-                .betweenPrice;
+                  .betweenPrice;
                 console.log(_price)
                 prcieList.push(this.keepTwoDecimal(_price))
               } else if (_waterMin >= _list[k].priceStart && _waterMin < _list[k].priceEnd) {
-                // 当前段价格+其他段价格
-                let _otherPice = this.getOtherPrice(_list[k])
+                // 当前区间段价格+其他区间段价格
+                let _otherPice = this.getOtherPrice(_list, _list[k], "leftBasic")
                 let _price1 = (_list[k].priceEnd - _waterMin) / 0.5 * _list[k].betweenPrice + _otherPice;
-
-
-
-                // _price+=_list[k].totalPrice
+                prcieList.push(basePrice + _price1)
 
               }
-
             }
             //基准值
             else if (_waterMin == parseFloat(this.baseInfoForm.waterBase)) {
-                   prcieList.push(this.keepTwoDecimal(basePrice))
+              prcieList.push(this.keepTwoDecimal(basePrice))
             }
             // 基准右边
             else {
-
-            if (_waterMin > _list[k].priceStart && _waterMin <=_list[k].priceEnd && !this.splitPriceList[i]
+              if (_waterMin > _list[k].priceStart && _waterMin <= _list[k].priceEnd && !this.splitPriceList[i]
                 .haveSplit) {
-                _price = basePrice - (parseFloat(this.baseInfoForm.waterBase) - _waterMin) / 0.5 * _list[k]
-                .betweenPrice;
+                _price = basePrice - (_waterMin - parseFloat(this.baseInfoForm.waterBase)) / 0.5 * _list[k]
+                  .betweenPrice;
                 console.log(_price)
                 prcieList.push(this.keepTwoDecimal(_price))
-              } else if (_waterMin >= _list[k].priceStart && _waterMin < _list[k].priceEnd) {
+              } else if (_waterMin > _list[k].priceStart && _waterMin <= _list[k].priceEnd) {
                 // 当前段价格+其他段价格
-                let _otherPice = this.getOtherPrice(_list[k])
-                let _price1 = (_list[k].priceEnd - _waterMin) / 0.5 * _list[k].betweenPrice + _otherPice;
-
-
-
-                // _price+=_list[k].totalPrice
-
+                let _otherPice2 = this.getOtherPrice(_list, _list[k], "rightBasic")
+                let _price2 = (_waterMin - _list[k].priceEnd) / 0.5 * _list[k].betweenPrice + _otherPice2;
+                prcieList.push(basePrice - _price2)
               }
-
-
             }
-
-
           }
         }
         return prcieList
+      },
+      // 构造查看粮价设置数据
+      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.waterMax) {
+              _obj = {
+                type: 2,
+                name: "基准",
+                water: _detailList[k],
+                isWrite: false
+              }
+            } else {
+              _obj = {
+                name: "分界",
+                water: _detailList[k],
+                type: 5,
+                index: k,
+                isWrite: false
+              }
 
+            }
+            _newDetailList.push(_obj)
+            if (k != _detailList.length - 1) {
+              _newDetailList.push({
+                type: 4,
+                jfprice: _pointPrice[k]
+              })
+            }
+          }
+          let _obj = {
+            basicUnitPrice: _priceList[i].basePrice,
+            index: i,
+            checkList: _checkList,
+            detailList: _newDetailList
+          }
+          this.priceList.push(_obj)
+        }
+      }
     },
   }
 </script>
@@ -859,9 +954,14 @@
           background: #5473E8;
           border-radius: 2px;
           color: white;
-          display: inline-block;
-          text-align: center;
-          line-height: 16px;
+          background: #5473E8;
+          border-radius: 2px;
+          color: white;
+          padding: 0 !important;
+          display: inline-flex;
+          justify-content: center;
+          align-items: center;
+          font-size: 14px;
         }
 
         .reduce {

+ 3 - 3
src/views/houseSelfCollect/component/routers/route.js

@@ -8,7 +8,7 @@ const houseSelfCollectRouter = {
   alwaysShow: true, // will always show the root menu
   meta: {
     title: 'houseSelfCollect',
-    module: 'contractManagement',
+    module: 'acquisitionManagement',
     icon: '-hetongguanli'
   },
   children: [
@@ -65,7 +65,7 @@ const houseSelfCollectRouter = {
       meta: {
         title: 'acquisitionManagement',
         shortcutEntrance: 'houseSelfCollect',
-        module: 'procurement.procurementOrder.delete',
+        module: 'acquisitionManagement.acquisition.view',
         permissicon: [],
         keepAlive: true
       }
@@ -79,7 +79,7 @@ const houseSelfCollectRouter = {
       meta: {
         title: 'acquisitionManagementAdd',
         shortcutEntrance: 'houseSelfCollect',
-        module: 'procurement.procurementOrder.delete',
+        module: 'acquisitionManagement.acquisition.add',
         permissicon: [],
         keepAlive: true
       },

+ 1 - 48
src/views/houseSelfCollect/customerManagement.vue

@@ -9,21 +9,6 @@
         >
       </template>
       <template slot="right">
-        <ws-select
-          v-model="searchTypeText"
-          placeholder=""
-          @change="selecttaskType"
-          :value="searchType"
-        >
-          <ws-option
-            v-for="item in warehouseList"
-            :key="item.value"
-            :label="item.value"
-            :value="item.value"
-            style="color: #8890b1"
-          />
-        </ws-select>
-        <div></div>
         <ws-input
           v-model="searchKeyWord"
           placeholder="可按姓名、手机号查找"
@@ -47,18 +32,6 @@
       </template>
     </BaseHeaderLayout>
     <div class="seach">
-      <!-- <div class="search-left">
-        <ws-input v-model="searchKeyWord" placeholder="可按姓名、手机号查找" clearable maxlength="500" type="input"
-          class="findValue"></ws-input>
-        <ws-button class="find" type="primary" @click="find()">
-          <img width="16" height="16" style="
-              vertical-align: text-top;
-              position: relative;
-              top: 0px;
-              left: -8px;
-            " src="../../../public/img/sousuo.png" alt />
-        </ws-button>
-      </div> -->
       <div class="search-right">
         <!-- <ws-button @click="getCustomer()">获取客户</ws-button> -->
         <el-dialog
@@ -161,7 +134,6 @@
 import {
   getCustomerManage,
   getCustomerDelete,
-  selectWarehouseSelf,
 } from '@/model/houseSelfCollect/index'
 import QRCode from 'qrcodejs2'
 import customerManagementAdd from './customerManagementAdd.vue'
@@ -180,9 +152,6 @@ export default {
       pageSize: 10,
       deptBudgetTotal: 0,
       deptCircularPage: {},
-      warehouseList: [], //选择仓库数组
-      searchTypeText: '', //仓库
-      searchType: '',
     }
   },
   activated() {
@@ -206,8 +175,6 @@ export default {
         })
       })
     },
-    //选择仓库改变事件
-    selecttaskType() {},
     //创建客户
     createCustomer(row, num) {
       let type = num
@@ -257,26 +224,12 @@ export default {
         })
     },
     getList() {
-      selectWarehouseSelf({
-        compId: sessionStorage.getItem('ws-pf_compId'),
-        personCharge: sessionStorage.getItem('ws-pf_staffName'),
-      })
-        .toPromise()
-        .then((response) => {
-          this.warehouseList = []
-          for (let i = 0; i < response.length; i++) {
-            this.warehouseList.push({
-              value: response[i].warehouseName,
-            })
-          }
-        })
-
       getCustomerManage({
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         searchKeyWord: this.searchKeyWord,
-        searchTypeText:this.searchTypeText
+        warehouseName:this.warehouseName
       })
         .toPromise()
         .then((response) => {

+ 36 - 5
src/views/houseSelfCollect/customerManagementAdd.vue

@@ -1,4 +1,4 @@
-<!--客户管理-->
+<!--客户管理添加-->
 <template>
   <div class="center">
     <el-row>
@@ -307,6 +307,7 @@ import {
   customerIdentity,
   getCustomerLook,
   CustomerEdit,
+  getIdentity,
 } from '@/model/houseSelfCollect/index'
 
 export default {
@@ -316,7 +317,13 @@ export default {
     return {
       dialogImageUrl: '',
       dialogVisible: false,
-      customerList: {},
+      customerList: {
+        customerName:"",
+        customerNumberCard:"",
+        bankCard:"",
+        bankDeposit:"",
+
+      },
       disabledFlag: true,
       disabled: false,
       identity: [],
@@ -460,10 +467,33 @@ export default {
     upLoadSuccess1(e) {
       this.identityUp = 'up'
       this.identity[0] = e.url
+      getIdentity({personImg:e.url})
+        .toPromise()
+        .then((response) => {
+          if(response.recPerson != "" ){
+             this.customerList.customerName = response.recPerson
+          }
+          if(response.recPersonNo != ""){
+             this.customerList.customerNumberCard = response.recPersonNo
+
+          }
+        })
     },
     upLoadSuccess2(e) {
       this.identityLow = 'low'
       this.identity[1] = e.url
+      getIdentity({personImg:e.url})
+        .toPromise()
+        .then((response) => {
+          if(response.recPerson != "" ){
+             this.customerList.customerName = response.recPerson
+          }
+          if(response.recPersonNo != ""){
+             this.customerList.customerNumberCard = response.recPersonNo
+
+          }
+        })
+
     },
     bankSuccess1(e) {
       this.bankUps = 'bankUp'
@@ -517,8 +547,8 @@ export default {
             CustomerEdit(this.customerList)
               .toPromise()
               .then((response) => {
-                  this.$message.success('修改成功')
-                    this.$router.push({ path: 'customerManagement' })
+                this.$message.success('修改成功')
+                this.$router.push({ path: 'customerManagement' })
               })
           })
           .catch(() => {
@@ -527,7 +557,8 @@ export default {
       }
     },
     getList(ids) {
-      getCustomerLook({ id: ids })
+      authenticationStatusKey==7
+      getCustomerLook({ id: ids,authenticationStatusKey: 7 })
         .toPromise()
         .then((response) => {
           this.customerList = response

+ 146 - 92
src/views/houseSelfCollect/inspectInfo.vue

@@ -48,9 +48,9 @@
             </ws-form-item>
             <ws-form-item label="客户" span="1" prop="customerName">
               <ws-select
-                placeholder="请输入客户"
+                placeholder=""
                 class="typeselect"
-                @change="selectpackingMethod"
+                @change="customerChange"
                 :disabled="disabled"
               >
                 <ws-option
@@ -104,6 +104,46 @@
                 :disabled="disabled"
               />
             </ws-form-item>
+            <ws-form-item label="类型" span="1" prop="type">
+              <ws-select
+                v-model="inspect.type"
+                placeholder=""
+                :disabled="disabled"
+              >
+                <ws-option
+                  v-for="item in typeList"
+                  :key="item"
+                  :label="item"
+                  :value="item"
+                />
+              </ws-select>
+            </ws-form-item>
+            <ws-form-item
+              label="购粮性质"
+              span="1"
+              prop="natureOfGrainPurchase"
+            >
+              <ws-input
+                v-model="inspect.natureOfGrainPurchase"
+                placeholder="请输入购粮性质"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+            <ws-form-item
+              label="净重单价(元/公斤)"
+              span="1"
+              prop="buckleWeightRatio"
+            >
+              <ws-input
+                v-model="inspect.tidalGrainPrice"
+                placeholder="请输入净重单价"
+                maxlength="100"
+                size="small"
+                disabled
+              />
+            </ws-form-item>
           </ws-info-table>
 
           <div class="title">质检数据</div>
@@ -139,7 +179,7 @@
                 placeholder="请输入水分占比"
                 maxlength="100"
                 size="small"
-                @change = "waterContentChange"
+                @change="waterContentChange"
                 :disabled="disabled"
               />
             </ws-form-item>
@@ -180,10 +220,9 @@
               />
             </ws-form-item>
           </ws-info-table>
-          <div style="text-align: right; color: #323233">
+          <!-- <div style="text-align: right; color: #323233">
             潮粮单价(元/公斤):{{ unitPrice}}
-            <!-- 潮粮单价(元/公斤):{{ inspect.tidalGrainPrice == null?"0": inspect.tidalGrainPrice}} -->
-          </div>
+          </div> -->
           <div class="but">
             <el-button @click="cancel" v-if="this.types != 2" type="primary"
               >取消</el-button
@@ -209,7 +248,8 @@ import {
   getinspectLook,
   getinspectLookUnitPrice,
   getinspectLookGoods,
-  getinspectEdit
+  getinspectEdit,
+  getamount,
 } from '@/model/houseSelfCollect/index'
 import { packList } from '@/model/contarct/index'
 import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
@@ -221,7 +261,9 @@ export default {
   data() {
     return {
       // warehouseList: {},
-      inspect: {},
+      inspect: {
+        tidalGrainPrice: 0,
+      },
       disabled: false,
       types: '1',
       information: '添加',
@@ -230,19 +272,23 @@ export default {
       customerList: [],
       getbinNumberList: [],
       cangid: '', //仓库id
-      warehouseName:'',
-       unitPrice:0,
-       count:0,
-       cangNo:"",
+      warehouseName: '',
+      unitPrice: 0,
+      count: 0,
+      cangNo: '',
+      typeList: ['干粮', '潮粮'],
+      purchasePriceList:[],
+      id:"",
     }
   },
   activated() {
     this.types = this.$route.query.type
     this.cangid = this.$route.query.cangid
     this.warehouseName = this.$route.query.warehouseName
-    let id = this.$route.query.id
     this.cangNo = this.$route.query.warehouseNo
-    this.count = Number(this.$route.query.count)+1 
+    this.count = Number(this.$route.query.count) + 1
+    this.purchasePriceList = this.$route.query.purchasePriceList
+    this.id = this.$route.query.id
     if (this.types == 2) {
       this.disabled = true
       this.information = '查看'
@@ -251,7 +297,7 @@ export default {
       this.information = '编辑'
     }
     this.calculation()
-    this.getList(id)
+    this.getList(this.id)
   },
   methods: {
     getdate() {
@@ -268,103 +314,112 @@ export default {
       return year + mouth + datetime
     },
     calculation() {
-      let number ="000"+ this.count
-      number = number.substring(number.length - 4,number.length)
-      this.inspect.qualityNo = 'SGRK' + this.getdate()+this.cangNo+number //SGRK+8位时间+3位仓库编号+4位序列号
+      let number = '000' + this.count
+      number = number.substring(number.length - 4, number.length)
+      this.inspect.qualityNo = 'SGRK' + this.getdate() + this.cangNo + number //SGRK+8位时间+3位仓库编号+4位序列号
       // + this.verifyinit()
     },
     print() {
       this.inspect.warehouseName = this.warehouseName
-          this.inspect.compId = sessionStorage.getItem('ws-pf_compId')
-      if(this.types == null){
-         this.$confirm('确定保存质检信息?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(() => {
-          
-          inspectAdd(this.inspect)
-            .toPromise()
-            .then((response) => {
-              this.$message.success('保存成功')
-              // this.xx = true;
-              // let newstr = document.getElementById('print').innerHTML
-              // let oldstr = document.body.innerHTML
-              // document.body.innerHTML = newstr
-              // window.print()
-              // document.body.innerHTML = oldstr
-              // // window.location.reload()
-              this.$router.push({ path: 'paymentManagement' })
-            })
-        })
-        .catch(() => {
-          return false
-        })
-
-      }else if(this.types == 3){
-         this.$confirm('确定保存质检信息?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(() => {
-          // return
-          getinspectEdit(this.inspect)
-            .toPromise()
-            .then((response) => {
-              this.$message.success('修改成功')
-              // this.xx = true;
-              // let newstr = document.getElementById('print').innerHTML
-              // let oldstr = document.body.innerHTML
-              // document.body.innerHTML = newstr
-              // window.print()
-              // document.body.innerHTML = oldstr
-              // window.location.reload()
-              this.$router.push({ path: 'paymentManagement' })
-            })
+      this.inspect.compId = sessionStorage.getItem('ws-pf_compId')
+      this.qualityInspector = sessionStorage.getItem('ws-pf_staffName')
+      if (this.types == null) {
+        this.$confirm('确定保存质检信息?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
         })
-        .catch(() => {
-          return false
+          .then(() => {
+            inspectAdd(this.inspect)
+              .toPromise()
+              .then((response) => {
+                this.$message.success('保存成功')
+                this.$router.push({ path: 'paymentManagement' })
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      } else if (this.types == 3) {
+        this.$confirm('确定保存质检信息?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
         })
-
+          .then(() => {
+            // return
+            getinspectEdit(this.inspect)
+              .toPromise()
+              .then((response) => {
+                this.$message.success('修改成功')
+                // this.xx = true;
+                // let newstr = document.getElementById('print').innerHTML
+                // let oldstr = document.body.innerHTML
+                // document.body.innerHTML = newstr
+                // window.print()
+                // document.body.innerHTML = oldstr
+                // window.location.reload()
+                this.$router.push({ path: 'paymentManagement' })
+              })
+          })
+          .catch(() => {
+            return false
+          })
       }
-     
     },
     cancel() {
       this.$router.push({ path: 'inspectionManagement' })
     },
+    customerChange(e) {
+      let customers = e.split('(')
+      this.inspect.customerName = customers[0]
+      this.inspect.customerPhone = customers[1].split(')')[0]
+      //客户下拉校验
+      // getamount({
+      //   compId: sessionStorage.getItem('ws-pf_compId'),
+      //   customerName: this.inspect.customerPhone,
+      //   goodsName: this.inspect.goodsName,
+      // })
+      //   .toPromise()
+      //   .then((response) => {
+      //     console.log(response)
+      //   })
+    },
+
     waterContentChange() {
+      if(this.inspect.goodsName){
+        for(var i=0;i<this.purchasePriceList.length;i++){
+          if(this.purchasePriceList[i].goodsName == this.inspect.goodsName){
+            this.inspect.buckleWeightRatio = this.purchasePriceList[i].deductWeight
+          }
+        }
+      }
       //潮粮单价改变事件
-      if(this.inspect.goodsName != null && this.inspect.waterContent != null && this.inspect.grade != null){
+      if (
+        this.inspect.goodsName  &&
+        this.inspect.waterContent  &&
+        this.inspect.grade 
+      ) {
         getinspectLookUnitPrice({
-        warehouseId: this.cangid,
-        goodsName: this.inspect.goodsName,
-        waterContent: this.inspect.waterContent,
-        grade:this.inspect.grade
-      })
-        .toPromise()
-        .then((response) => {
-          this.inspect.tidalGrainPrice = response
-          this.unitPrice = response
+          warehouseId: this.cangid,
+          goodsName: this.inspect.goodsName,
+          waterContent: this.inspect.waterContent,
+          grade: this.inspect.grade,
         })
+          .toPromise()
+          .then((response) => {
+            this.inspect.tidalGrainPrice = response
+            this.unitPrice = response
+          })
       }
-      
-    },
-    //货名改变事件
-    selectpackingMethod(e) {
-      let customers = e.split("(")
-      //  customers = customers[1].split(")")
-
-      this.inspect.customerName = customers[0]
-      this.inspect.customerPhone = customers[1].split(")")[0]
-
     },
+   
     getList(ids) {
       // 货名
       getinspectLookGoods({ warehouseId: this.cangid })
         .toPromise()
         .then((response) => {
+          this.goodnameList = []
           this.goodnameList = response
         })
       // 品级
@@ -393,13 +448,12 @@ export default {
       getbinNumber({ id: this.cangid })
         .toPromise()
         .then((response) => {
-          this.getbinNumberList=[]
+          this.getbinNumberList = []
           for (let i = 0; i < response.warehousePositionInfoList.length; i++) {
             this.getbinNumberList.push({
               value: response.warehousePositionInfoList[i].binNumber,
             })
           }
-          // this.getbinNumberList = response.warehousePositionInfoList
         })
       if (this.types == 2 || this.types == 3) {
         //查看

+ 368 - 300
src/views/houseSelfCollect/inspectionManagement.vue

@@ -6,34 +6,70 @@
         <ws-button type="primary" @click="inspectInfo(1)">添加</ws-button>
       </template>
       <template slot="right">
-        <ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType">
-          <ws-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
-            style="color: #8890b1" />
+        <ws-select
+          v-model="warehouseName"
+          placeholder=""
+          @change="warehouseNameChange"
+          :value="searchType"
+        >
+          <ws-option
+            v-for="item in warehouseList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+            style="color: #8890b1"
+          />
         </ws-select>
         <div></div>
-        <ws-input v-model="searchKeyWord" placeholder="可按编号、客户名、车牌号查找" clearable maxlength="500" type="input">
+        <ws-input
+          v-model="searchKeyWord"
+          placeholder="可按编号、客户名、车牌号查找"
+          clearable
+          maxlength="500"
+          type="input"
+        >
         </ws-input>
-        <ws-button class="find" type="primary" @click="find()"><img width="16" height="16" style="
+        <ws-button class="find" type="primary" @click="find()"
+          ><img
+            width="16"
+            height="16"
+            style="
               vertical-align: text-top;
               position: relative;
               top: 0px;
               left: -8px;
-            " src="../../../public/img/sousuo.png" alt="" /></ws-button>
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
       </template>
     </BaseHeaderLayout>
-    <el-table :data="inspect" style="width: 100%; margin-top: 20px" ref="inspect" border height="780">
+    <el-table
+      :data="inspect"
+      style="width: 100%; margin-top: 20px"
+      ref="inspect"
+      border
+      height="780"
+    >
       <el-table-column type="index" label="序号" width="50">
         <template scope="scope">
           <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
           <span v-else>{{ scope.$index + 1 }}</span>
         </template>
       </el-table-column>
-      <el-table-column prop="qualityNo" width="120" label="编号"></el-table-column>
+      <el-table-column
+        prop="qualityNo"
+        width="120"
+        label="编号"
+      ></el-table-column>
       <el-table-column prop="customerName" label="客户"></el-table-column>
       <el-table-column prop="carNumber" label="车牌号"></el-table-column>
       <el-table-column prop="goodsName" label="货名"></el-table-column>
       <el-table-column prop="waterContent" label="水分(%)"></el-table-column>
-      <el-table-column prop="tidalGrainPrice" label="净重单价(元/公斤)"></el-table-column>
+      <el-table-column
+        prop="tidalGrainPrice"
+        label="净重单价(元/公斤)"
+      ></el-table-column>
       <el-table-column prop="binNumber" label="仓位号"></el-table-column>
       <el-table-column prop="storageTagNo" label="囤位号"></el-table-column>
       <el-table-column prop="qualityInspector" label="质检员"></el-table-column>
@@ -48,62 +84,68 @@
         </template>
       </el-table-column>
     </el-table>
-     <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食质检单">
-      <div class="number">{{printData.qualityNo}}</div>
-  <table class="table">
-    <tr class="row">
-      <td class="col col-bgc">客户姓名</td>
-      <td class="col" colspan="2">{{printData.customerName}}</td>
-      <td class="col col-bgc">客户电话</td>
-      <td class="col" colspan="2">{{printData.customerPhone}}</td>
-      <td class="col col-bgc">车牌号</td>
-      <td class="col">{{printData.carNumber}}</td>
-    </tr>
-    <tr class="row">
-      <td class="col col-bgc">收货单位</td>
-      <td class="col" colspan="2">{{printData.receivingUnit}}</td>
-      <td class="col col-bgc">联系人</td>
-      <td class="col" colspan="2">{{printData.contacts}}</td>
-      <td class="col col-bgc">联系电话</td>
-      <td class="col">{{printData.contactsPhone}}</td>
-    </tr>
-    <tr class="row">
-      <td class="col col-bgc">货名</td>
-      <td class="col">{{printData.goodsName}}</td>
-      <td class="col col-bgc">类型</td>
-      <td class="col">{{printData.customerName}}</td>
-      <td class="col col-bgc">容量(克/升)</td>
-      <td class="col">{{printData.bulkDensity}}</td>
-      <td class="col col-bgc">不完整粒(%)</td>
-      <td class="col">{{printData.imperfectGrain}}</td>
-    </tr>
-    <tr class="row">
-      <td class="col col-bgc">等级</td>
-      <td class="col">{{printData.grade}}</td>
-      <td class="col col-bgc">水分(%)</td>
-      <td class="col">{{printData.waterContent}}</td>
-      <td class="col col-bgc">热损伤(%)</td>
-      <td class="col">{{printData.jiaorenli}}</td>
-      <td class="col col-bgc">单价(元/公斤)</td>
-      <td class="col">{{printData.tidalGrainPrice}}</td>
-    </tr>
-    <tr class="row">
-      <td class="col col-bgc">杂质(%)</td>
-      <td class="col">{{printData.impurity}}</td>
-      <td class="col col-bgc">霉变粒(%)</td>
-      <td class="col">{{printData.mildewGrain}}</td>
-      <td class="col col-bgc" colspan="2">购粮性质</td>
-      <td class="col" colspan="2">{{printData.customerName}}</td>
-    </tr>
-  </table>
+     <el-dialog
+      width="70%"
+      class="table-content"
+      center
+      :visible.sync="isShowPrint"
+      title="粮食质检单"
+    >
+      <div class="number">{{ printData.qualityNo }}</div>
+      <table class="table">
+        <tr class="row">
+          <td class="col col-bgc">客户姓名</td>
+          <td class="col" colspan="2">{{ printData.customerName }}</td>
+          <td class="col col-bgc">客户电话</td>
+          <td class="col" colspan="2">{{ printData.customerPhone }}</td>
+          <td class="col col-bgc">车牌号</td>
+          <td class="col">{{ printData.carNumber }}</td>
+        </tr>
+        <tr class="row">
+          <td class="col col-bgc">收货单位</td>
+          <td class="col" colspan="2">{{ printData.receivingUnit }}</td>
+          <td class="col col-bgc">联系人</td>
+          <td class="col" colspan="2">{{ printData.contacts }}</td>
+          <td class="col col-bgc">联系电话</td>
+          <td class="col">{{ printData.contactsPhone }}</td>
+        </tr>
+        <tr class="row">
+          <td class="col col-bgc">货名</td>
+          <td class="col">{{ printData.goodsName }}</td>
+          <td class="col col-bgc">类型</td>
+          <td class="col">{{ printData.customerName }}</td>
+          <td class="col col-bgc">容量(克/升)</td>
+          <td class="col">{{ printData.bulkDensity }}</td>
+          <td class="col col-bgc">不完整粒(%)</td>
+          <td class="col">{{ printData.imperfectGrain }}</td>
+        </tr>
+        <tr class="row">
+          <td class="col col-bgc">等级</td>
+          <td class="col">{{ printData.grade }}</td>
+          <td class="col col-bgc">水分(%)</td>
+          <td class="col">{{ printData.waterContent }}</td>
+          <td class="col col-bgc">热损伤(%)</td>
+          <td class="col">{{ printData.jiaorenli }}</td>
+          <td class="col col-bgc">单价(元/公斤)</td>
+          <td class="col">{{ printData.tidalGrainPrice }}</td>
+        </tr>
+        <tr class="row">
+          <td class="col col-bgc">杂质(%)</td>
+          <td class="col">{{ printData.impurity }}</td>
+          <td class="col col-bgc">霉变粒(%)</td>
+          <td class="col">{{ printData.mildewGrain }}</td>
+          <td class="col col-bgc" colspan="2">购粮性质</td>
+          <td class="col" colspan="2">{{ printData.customerName }}</td>
+        </tr>
+      </table>
       <div class="bottom">
         <div class="bottom-row1">
-          <div>质检:{{printData.qualityInspector}}</div>
-          <div>{{printData.qualityDate}}</div>
+          <div>质检:{{ printData.qualityInspector }}</div>
+          <div>{{ printData.qualityDate }}</div>
         </div>
         <div class="bottom-row2">
           <div class="left">
-            <img src="../../../public/img/add.png" alt="">
+            <img src="../../../public/img/add.png" alt="" />
           </div>
           <div class="config">收货单位签名或盖章</div>
           <div class="">客户签名</div>
@@ -114,285 +156,311 @@
           <el-button type="primary" @click="printSmall">打印小票</el-button>
           <el-button type="primary" @click="printBig">打印单据</el-button>
         </div>
-
       </div>
     </el-dialog>
     <div style="text-align: center">
-      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
-        :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper"
-        :total="deptBudgetTotal">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal"
+      >
       </el-pagination>
     </div>
   </div>
 </template>
 <script>
-  import {
-    selectWarehouseSelf,
-    getinspectList,
-    getinspectDelete,
-    getinspectLook
-  } from '@/model/houseSelfCollect/index'
+import {
+  selectWarehouseSelf,
+  getinspectList,
+  getinspectDelete,
+  getinspectLook,
+} from '@/model/houseSelfCollect/index'
 
-  export default {
-    components: {},
-    watch: {},
-    data() {
-      return {
-        //分页
-        currentPage: 1,
-        pageSize: 10,
-        deptCircularPage: {},
-        deptBudgetTotal: 0,
+export default {
+  components: {},
+  watch: {},
+  data() {
+    return {
+      //分页
+      currentPage: 1,
+      pageSize: 10,
+      deptCircularPage: {},
+      deptBudgetTotal: 0,
 
-        searchKeyWord: '',
-        taskTypeList: [],
-        searchType: 0,
-        warehouseName: '',
-        inspect: [],
-        warehouseList: [],
-        cangid: '', //仓库id
-        warehouseCount: "",
-        warehouseNo: "",
-        isShowPrint: false,
-        printData:{}
-      }
-    },
-    activated() {
+      searchKeyWord: '',
+      taskTypeList: [],
+      searchType: 0,
+      warehouseName: '',
+      inspect: [],
+      warehouseList: [],
+      cangid: "", //仓库id
+      warehouseCount: "",
+      warehouseNo: "",
+      isShowPrint: false,
+      printData: {},
+      deductWeight:"",//扣重比
+      saleLimit:"",
+      purchasePriceList:[]
+
+    }
+  },
+  activated() {
+    this.getList()
+  },
+  methods: {
+    find() {
       this.getList()
     },
-    methods: {
-      find() {
-        this.getList()
-      },
-      inspectInfo(row, index) {
-        //添加,编辑,查看
-        this.$router.push({
-          path: 'inspectInfo',
-          query: {
-            type: index,
-            cangid: this.cangid,
+    inspectInfo(row, index) {
+      //添加,编辑,查看
+      this.$router.push({
+        path: 'inspectInfo',
+        query: {
+          type: index,
+          cangid: this.cangid,
+          id: row.id,
+          warehouseName: this.warehouseName,
+          count: this.warehouseCount,
+          warehouseNo: this.warehouseNo,
+          purchasePriceList:this.purchasePriceList
+        },
+      })
+    },
+    warehouseNameChange(e) {
+      console.log(this.warehouseList)
+      for(let i = 0 ; i < this.warehouseList.length; i++){
+        if(this.warehouseList[i].value == e){
+           this.warehouseName = this.warehouseList[i].value
+          this.warehouseCount = this.warehouseList[i].count
+          this.warehouseNo = this.warehouseList[i].No
+          this.cangid = this.warehouseList[i].id
+          this.purchasePriceList = this.warehouseList[i].purchasePriceList
+        }
+      }
+    },
+    del(row) {
+      //删除
+      this.$confirm('确定删除质检信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          getinspectDelete({
             id: row.id,
-            warehouseName: this.warehouseName,
-            count: this.warehouseCount,
-            warehouseNo: this.warehouseNo
-          },
-        })
-      },
-      warehouseNameChange(e) {
-        console.log(e, "eeeeeeeeeeeeeeeeee")
-      },
-      del(row) {
-        //删除
-        this.$confirm('确定删除质检信息?', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning',
-          })
-          .then(() => {
-            getinspectDelete({
-                id: row.id
-              })
-              .toPromise()
-              .then((response) => {
-                this.$notify.success({
-                  title: '成功',
-                  message: '删除成功',
-                })
-                this.getList()
-              })
-              .catch((response) => {
-                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              })
-          })
-          .catch(() => {
-            return false
           })
-      },
-      handleSizeChange(val) {
-        console.log(`每页 ${val} 条`)
-        this.pageSize = val
-        this.getList()
-      },
-      handleCurrentChange(val) {
-        this.currentPage = val
-        console.log(`当前页: ${val}`)
-        this.getList()
-      },
-      getList() {
-        selectWarehouseSelf({
-            compId: sessionStorage.getItem('ws-pf_compId'),
-            personCharge: sessionStorage.getItem('ws-pf_staffName'),
-          })
-          .toPromise()
-          .then((response) => {
-            this.warehouseList = []
-            for (let i = 0; i < response.length; i++) {
-              this.warehouseList.push({
-                // valueKey: i,
-                value: response[i].warehouseName,
-                id: response[i].id,
-                count: response[i].count
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功',
               })
-            }
-            this.warehouseName = response[0].warehouseName
-            this.warehouseCount = response[0].count
-            this.warehouseNo = response[0].commonWarehouseNo
-            this.cangid = response[0].id
-          })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    getList() {
+      selectWarehouseSelf({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        personCharge: sessionStorage.getItem('ws-pf_staffName'),
+      })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList = []
+          for (let i = 0; i < response.length; i++) {
+            this.warehouseList.push({
+              value: response[i].warehouseName,
+              id: response[i].id,
+              count: response[i].count,
+              purchasePriceList: response[i].purchasePriceList,
+              No:response[i].commonWarehouseNo
+            })
+          }
+          if(this.warehouseList.length > 0){
+            this.warehouseName =  this.warehouseList[0].value
+            this.warehouseCount =  this.warehouseList[0].count
+            this.warehouseNo =  this.warehouseList[0].No
+            this.cangid =  this.warehouseList[0].id
+            this.purchasePriceList =  this.warehouseList[0].purchasePriceList
+          }
+        })
 
-        getinspectList({
-            compId: sessionStorage.getItem('ws-pf_compId'),
-            currentPage: this.currentPage,
-            pageSize: this.pageSize,
-            searchKeyWord: this.searchKeyWord,
-            warehouseName: this.warehouseName,
-          })
-          .toPromise()
-          .then((response) => {
-            // for (let i = 0; i < response.length; i++) {
-            //   this.warehouseList.push({
-            //     valueKey: i,
-            //     value: response[i].warehouseName,
-            //     id:response[i].id
-            //   })
-            // }
-            // this.searchTypeText = response[0].warehouseName
-            // this.id = response[0].id
-            // console.log(response)
-            this.inspect = response.records
-            this.deptBudgetTotal = response.total
-          })
-      },
-      print(row) {
-        getinspectLook({
-            id: row.id
-          })
-          .toPromise()
-          .then((response) => {
-            this.isShowPrint = true
-            this.printData = response
-            // window.location.href="../../../static/inspection.html?dataList="+JSON.stringify(response)
-          })
-      },
-      printSmall() {
-        window.location.href = "../../../static/inspection.html?type=1&dataList=" + JSON.stringify(this.printData)
-      },
-      printBig() {
-        window.location.href = "../../../static/inspection.html?type=2&dataList=" + JSON.stringify(this.printData)
-      },
+      getinspectList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchKeyWord: this.searchKeyWord,
+        warehouseName: this.warehouseName,
+      })
+        .toPromise()
+        .then((response) => {
+          // for (let i = 0; i < response.length; i++) {
+          //   this.warehouseList.push({
+          //     valueKey: i,
+          //     value: response[i].warehouseName,
+          //     id:response[i].id
+          //   })
+          // }
+          // this.searchTypeText = response[0].warehouseName
+          // this.id = response[0].id
+          // console.log(response)
+          this.inspect = response.records
+          this.deptBudgetTotal = response.total
+        })
     },
-  }
+    print(row) {
+      getinspectLook({
+        id: row.id,
+      })
+        .toPromise()
+        .then((response) => {
+          this.isShowPrint = true
+          this.printData = response
+          // window.location.href="../../../static/inspection.html?dataList="+JSON.stringify(response)
+        })
+    },
+    printSmall() {
+      window.location.href =
+        '../../../static/inspection.html?type=1&dataList=' +
+        JSON.stringify(this.printData)
+    },
+    printBig() {
+      window.location.href =
+        '../../../static/inspection.html?type=2&dataList=' +
+        JSON.stringify(this.printData)
+    },
+  },
+}
 </script>
 <style lang="scss" scoped>
-  /deep/.el-dialog__header {
-    text-align: center !important;
-    padding: 10px 0 !important;
-    height: auto !important;
-  }
+/deep/.el-dialog__header {
+  text-align: center !important;
+  padding: 10px 0 !important;
+  height: auto !important;
+}
 
-  /deep/.el-dialog__title {
-    font-size: 24px !important;
-  }
+/deep/.el-dialog__title {
+  font-size: 24px !important;
+}
 
-  table,
-  table tr th,
-  table tr td {
-    border: 2px solid #333333;
-    padding: 5px 0;
-  }
+table,
+table tr th,
+table tr td {
+  border: 2px solid #333333;
+  padding: 5px 0;
+}
 
-  table {
-    width: 100%;
-    min-height: 25px;
-    line-height: 25px;
-    text-align: center;
-    border-collapse: collapse;
-    border: 3px solid #333333;
-  }
+table {
+  width: 100%;
+  min-height: 25px;
+  line-height: 25px;
+  text-align: center;
+  border-collapse: collapse;
+  border: 3px solid #333333;
+}
 
-  .title {
-    font-size: 20px;
-    font-weight: 600;
-    margin: 20px 0 0 20px;
-  }
+.title {
+  font-size: 20px;
+  font-weight: 600;
+  margin: 20px 0 0 20px;
+}
 
-  .tit {
-    font-size: 16px;
-    font-weight: 600;
-    margin: 20px;
-  }
+.tit {
+  font-size: 16px;
+  font-weight: 600;
+  margin: 20px;
+}
 
-  .ws-info-table {
-    border: none;
-  }
+.ws-info-table {
+  border: none;
+}
 
-  .ws-info-table .el-form-item {
-    width: 50%;
-    border: none;
-  }
+.ws-info-table .el-form-item {
+  width: 50%;
+  border: none;
+}
 
-  /deep/.ws-info-table .el-form-item .el-form-item__label {
-    width: 30%;
-    text-align: center;
-    background: #ffffff;
-    color: #8890b1;
-  }
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 30%;
+  text-align: center;
+  background: #ffffff;
+  color: #8890b1;
+}
 
-  /deep/.ws-info-table .el-form-item .el-form-item__content {
-    border: none;
-  }
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  border: none;
+}
 
-  /deep/.el-table .el-table__header .cell,
-  .el-table .el-table__body .cell {
-    text-align: center;
-  }
+/deep/.el-table .el-table__header .cell,
+.el-table .el-table__body .cell {
+  text-align: center;
+}
 
-  /deep/.el-table--enable-row-transition .el-table__body td {
-    text-align: center;
-  }
+/deep/.el-table--enable-row-transition .el-table__body td {
+  text-align: center;
+}
 
-  .number {
-    text-align: right;
-    margin: 0 0 10px 0;
-  }
+.number {
+  text-align: right;
+  margin: 0 0 10px 0;
+}
 
-  .col-bgc {
-    background: #f6f7fb;
-  }
+.col-bgc {
+  background: #f6f7fb;
+}
 
-  .bottom-row1 {
-    display: flex;
-    justify-content: space-between;
-    margin: 10px 0;
-  }
+.bottom-row1 {
+  display: flex;
+  justify-content: space-between;
+  margin: 10px 0;
+}
 
-  .bottom-row2 {
-    display: flex;
-    margin: 10px 0;
+.bottom-row2 {
+  display: flex;
+  margin: 10px 0;
 
-    .left {
-      img {
-        width: 41px;
-        height: 41px;
-        margin-right: 118px;
-      }
-    }
-
-    .config {
-      margin-right: 240px;
+  .left {
+    img {
+      width: 41px;
+      height: 41px;
+      margin-right: 118px;
     }
   }
 
-  .bottom-row3 {
-    margin: 10px 0;
+  .config {
+    margin-right: 240px;
   }
+}
 
-  .bottom-row4 {
-    margin-top: 50px;
-    text-align: center;
-  }
+.bottom-row3 {
+  margin: 10px 0;
+}
 
-  /deep/.el-dialog__body {
-    padding: 20px !important;
-  }
+.bottom-row4 {
+  margin-top: 50px;
+  text-align: center;
+}
+
+/deep/.el-dialog__body {
+  padding: 20px !important;
+}
 </style>

+ 39 - 113
src/views/houseSelfCollect/weighingManagement.vue

@@ -5,13 +5,13 @@
       <template slot="left"> </template>
       <template slot="right">
         <ws-select
-          v-model="searchTypeText"
+          v-model="warehouseName"
           placeholder=""
-          @change="selecttaskType"
+          @change="warehouseNameChange"
           :value="searchType"
         >
           <ws-option
-            v-for="item in taskTypeList"
+            v-for="item in warehouseList"
             :key="item.value"
             :label="item.value"
             :value="item.value"
@@ -79,107 +79,12 @@
       <el-table-column width="300" prop="contractNo1" label="操作">
         <template slot-scope="scope">
 
-        <el-button @click="weightCheck(scope.row,1)" v-if="(scope.row.status !='已称皮重'&& scope.row.status !='已质检')">毛重</el-button>
+        <el-button @click="weightCheck(scope.row,1)" v-if="(scope.row.status !='已称皮重'&& scope.row.status =='已质检')">毛重</el-button>
         <el-button @click="weightCheck(scope.row,2)" v-if="scope.row.status =='已称毛重' || scope.row.status =='已称皮重'">皮重</el-button>
         <el-button @click="print" v-if="scope.row.status =='已称皮重'">打印</el-button>
         </template>
       </el-table-column>
     </el-table>
-
-    <!-- 毛重检斤 -->
-    <!-- <el-dialog width="40%" :visible.sync="paymentForm" :append-to-body="true">
-      <ws-form>
-        <div class="title">毛重检斤</div>
-        <ws-info-table>
-          <ws-form-item label="编号"  prop="waterContent">
-            <ws-input placeholder="请输入编号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="仓位号" prop="waterContent">
-            <ws-input placeholder="请输入仓位号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="客户" prop="waterContent">
-            <ws-input placeholder="请输入客户" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="囤位号" prop="waterContent">
-            <ws-input placeholder="请输入囤位号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="车牌号" prop="waterContent">
-            <ws-input placeholder="请输入车牌号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="货名" prop="waterContent">
-            <ws-input placeholder="请输入货名" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="毛重(公斤)" prop="waterContent">
-            <ws-input placeholder="请输入毛重" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <div><el-button @click="Reacquire">重新获取</el-button></div>
-        </ws-info-table>
-        <div style="text-align: center">
-          <el-button @click="paymentForm = false">取消</el-button>
-          <el-button @click="commit">保存</el-button>
-        </div>
-      </ws-form>
-    </el-dialog> -->
-    <!-- 皮重检斤 -->
-    <!-- <el-dialog width="40%" :visible.sync="paymentForm1" :append-to-body="true">
-      <ws-form>
-        <div class="title">皮重检斤</div>
-        <ws-info-table>
-          <ws-form-item label="编号" prop="waterContent">
-            <ws-input placeholder="请输入编号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="仓位号" prop="waterContent">
-            <ws-input placeholder="请输入仓位号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="客户" prop="waterContent">
-            <ws-input placeholder="请输入客户" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="囤位号" prop="waterContent">
-            <ws-input placeholder="请输入囤位号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="车牌号" prop="waterContent">
-            <ws-input placeholder="请输入车牌号" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item label="货名" prop="waterContent">
-            <ws-input placeholder="请输入货名" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item
-            label="毛重(公斤)"
-            prop="waterContent"
-            class="formItem"
-          >
-            <ws-input placeholder="请输入毛重" maxlength="100" disabled size="small" />
-          </ws-form-item>
-          <ws-form-item
-            label="皮重(公斤)"
-            prop="waterContent"
-            class="formItem"
-          >
-            <ws-input placeholder="请输入皮重" maxlength="100" size="small" />
-            <el-button @click="Reacquire">重新获取</el-button>
-          </ws-form-item>
-          <ws-form-item
-            label="扣杂(公斤)"
-            prop="waterContent"
-            class="formItem"
-          >
-            <ws-input placeholder="请输入扣杂" maxlength="100" size="small" />
-          </ws-form-item>
-          <ws-form-item
-            label="净重(公斤)"
-            prop="waterContent"
-            class="formItem"
-          >
-            <ws-input placeholder="请输入净重" maxlength="100" disabled size="small" />
-          </ws-form-item>
-        </ws-info-table>
-        <div style="text-align: center">
-          <el-button @click="paymentForm1 = false">取消</el-button>
-          <el-button @click="submit">保存</el-button>
-        </div>
-      </ws-form>
-    </el-dialog> -->
-    <!-- <houseSelfCollectPrint v-show="false"></houseSelfCollectPrint> -->
     <div style="text-align: center">
       <el-pagination
         @size-change="handleSizeChange"
@@ -194,7 +99,7 @@
   </div>
 </template>
 <script>
-import { getweighingList } from '@/model/houseSelfCollect/index'
+import { getweighingList, selectWarehouseSelf } from '@/model/houseSelfCollect/index'
 
 export default {
   components: {},
@@ -211,35 +116,39 @@ export default {
       weighingList: [],
       searchKeyWord: '',
       searchType: [],
-      searchTypeText: '',
+      warehouseName: '',
       value1: '', //选择时间
-      taskTypeList: [],
+      warehouseList: [],
+      warehouseId:"",
     }
   },
   activated() {
     this.getList()
   },
   methods: {
-    // GrossWeight() {
-    //   //毛重
-    //   this.paymentForm = true
-    // },
-    // tare() {
-    //   //皮重
-    //   this.paymentForm1 = true
-    // },
-    selecttaskType() {
-      //选择仓库改变方法
+    warehouseNameChange(e) {
+      // this.warehouseName = e
+      console.log(this.warehouseList )
+      for(let i = 0 ; i < this.warehouseList.length ; i++){
+        if(this.warehouseList[i].value == e){
+          this.warehouseId = this.warehouseList[i].warehouseId
+        }
+
+      }
     },
     weightCheck(row,num) {
       this.$router.push({
         path: 'weightCheck',
-        query: { tpyeNo: num ,id:row.id,number:row.number,binNumber:row.binNumber,customer:row.customer,storageNumber:row.storageNumber,carNumber:row.carNumber,goodsName:row.goodsName,grossWeight:row.grossWeight,tare:row.tare,netWeight:row.netWeight,relationId:row.relationId},
+        query: { tpyeNo: num ,id:row.id,number:row.number,binNumber:row.binNumber,customer:row.customer,storageNumber:row.storageNumber,carNumber:row.carNumber,goodsName:row.goodsName,grossWeight:row.grossWeight,tare:row.tare,netWeight:row.netWeight,relationId:row.relationId,warehouseId:this.warehouseId},
       })
     },
     // Reacquire() {
     //   //重新获取
     // },
+    find(){
+      this.getList()
+
+    },
 
     print() {
       let newstr = document.getElementById('print').innerHTML
@@ -261,6 +170,22 @@ export default {
       this.getList()
     },
     getList() {
+      selectWarehouseSelf({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        personCharge: sessionStorage.getItem('ws-pf_staffName'),
+      })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList = []
+          for (let i = 0; i < response.length; i++) {
+            this.warehouseList.push({
+              value: response[i].warehouseName,
+              warehouseId :response[i].id
+            })
+          }
+          this.warehouseName =  this.warehouseList[0].value
+          this.warehouseId = this.warehouseList[0].warehouseId
+        })
       getweighingList({
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
@@ -275,6 +200,7 @@ export default {
           //   message: '删除成功',
           // })
           this.weighingList = response.records 
+          this.deptBudgetTotal = response.total
           
         })
         .catch((response) => {

+ 82 - 96
src/views/houseSelfCollect/weightCheck.vue

@@ -75,21 +75,22 @@
                 disabled
               />
             </ws-form-item>
-            <!-- <div class="formitem"> -->
-            <ws-form-item
-              label="毛重(公斤)"
-              span="1"
-              prop="grossWeight"
-            >
+            <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
               <ws-input
                 v-model="weighingList.grossWeight"
-                placeholder="请输入毛重"
+                @change="calculation"
+                placeholder="未获取到毛重"
                 maxlength="100"
                 size="small"
-                disabled
+                :disabled="disabled"
               />
             </ws-form-item>
-            <el-button type="primary" :class="tpyeNo != 2?'':'css1'" @click="chongxin">重新获取</el-button>
+            <el-button
+              type="primary"
+              :class="tpyeNo != 2 ? '' : 'butCss'"
+              @click="chongxin"
+              >重新获取</el-button
+            >
             <ws-form-item
               label="皮重(公斤)"
               span="1"
@@ -98,23 +99,28 @@
             >
               <ws-input
                 v-model="weighingList.tare"
-                placeholder="请输入皮重"
+                @change="calculation"
+                placeholder="未获取到皮重"
                 maxlength="100"
                 size="small"
                 :disabled="disabled"
               />
             </ws-form-item>
 
-            <el-button type="primary"  v-if="this.tpyeNo == 2">重新获取</el-button>
+            <el-button type="primary" v-if="this.tpyeNo == 2"
+              >重新获取</el-button
+            >
             <div class="formItem">
               <ws-form-item
                 label="扣杂(公斤)"
                 span="1"
                 prop="buckleWeightRatio"
-                 v-if="this.tpyeNo == 2"
+                v-if="this.tpyeNo == 2"
               >
                 <ws-input
                   v-model="weighingList.buckleMiscellaneous"
+                  @change="calculation"
+                  number
                   placeholder="请输入扣杂"
                   maxlength="100"
                   size="small"
@@ -126,7 +132,7 @@
                 label="净重(公斤)"
                 span="1"
                 prop="netWeight"
-                 v-if="this.tpyeNo == 2"
+                v-if="this.tpyeNo == 2"
               >
                 <ws-input
                   v-model="weighingList.netWeight"
@@ -139,9 +145,7 @@
             </div>
           </ws-info-table>
           <div class="but">
-            <el-button @click="cancel" type="primary"
-              >取消</el-button
-            >
+            <el-button @click="cancel" type="primary">取消</el-button>
             <el-button @click="print" v-if="this.tpyeNo == 1" type="primary"
               >保存</el-button
             >
@@ -155,17 +159,20 @@
   </div>
 </template>
 <script>
-import { tare,grossWeight } from '@/model/houseSelfCollect/index'
+import { tare, grossWeight } from '@/model/houseSelfCollect/index'
 export default {
   data() {
     return {
       inspect: {},
       types: 1,
       information: '',
-      weighingList: {},
+      weighingList: {
+        buckleMiscellaneous: 0,
+      },
       tpyeNo: '',
-      disabled:false,
-      relationId:"",
+      disabled: false,
+      relationId: '',
+      warehouseId: '',
     }
   },
   activated() {
@@ -177,89 +184,71 @@ export default {
     this.weighingList.carNumber = this.$route.query.carNumber
     this.weighingList.goodsName = this.$route.query.goodsName
     this.weighingList.id = this.$route.query.id
-    // this.weighingList.grossWeight = this.$route.query.grossWeight
-    // this.weighingList.tare = this.$route.query.tare
-    // this.weighingList.netWeight = this.$route.query.netWeight
     this.relationId = this.$route.query.relationId
-    if(this.tpyeNo == 1){
-      this.information = "毛重"
-    }else if(this.tpyeNo == 2){
-      this.information = "皮重"
+    this.warehouseId = this.$route.query.warehouseId
+    if (this.tpyeNo == 1) {
+      this.information = '毛重'
+    } else if (this.tpyeNo == 2) {
+      this.information = '皮重'
     }
   },
   methods: {
-    submit() {
-      //皮重保存
-      this.$confirm('确定保存检斤信息?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(() => {})
-        .catch(() => {
-          return false
-        })
-    },
-    chongxin(){
-      if(this.tpyeNo == 2){
+    chongxin() {
+      if (this.tpyeNo == 2) {
         return
       }
-console.log("dfsgfgdgdsgszdf")
     },
-     cancel() {
+    cancel() {
       this.$router.push({ path: 'weighingManagement' })
     },
-    print(){
-      this.$confirm('确定保存检斤信息?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(() => {
-          if(this.tpyeNo == 1){
-            this.weighingList.relationId = this.relationId
-            grossWeight(this.weighingList)
-            .toPromise()
-            .then((response) => {
-              this.$notify.success({
-                title: '成功',
-                message: '保存成功',
-              })
-              this.$router.go(-1) 
-            })
-            .catch((response) => {
-              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-            })
-           }else if(this.tpyeNo == 2){
-              tare(this.weighingList)
-            .toPromise()
-            .then((response) => {
-              this.$notify.success({
-                title: '成功',
-                message: '保存成功',
-              })
-              this.$router.go(-1)
-            })
-            .catch((response) => {
-              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-            })
-           }
-        })
-        .catch(() => {
-          return false
-        })
+    calculation() {
+      if ( this.weighingList.grossWeight  && this.weighingList.tare ) {
+        let  count = 0
+        this.weighingList.netWeight =this.weighingList.grossWeight -this.weighingList.tare-this.weighingList.buckleMiscellaneous
+      }
     },
-    commit() {
-      //毛重保存
-      this.$confirm('确定保存检斤信息?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(() => {})
-        .catch(() => {
-          return false
+    print() {
+      ;(this.weighingList.secretaryWeigher =
+        sessionStorage.getItem('ws-pf_staffName')),
+        this.$confirm('确定保存检斤信息?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
         })
+          .then(() => {
+            if (this.tpyeNo == 1) {
+              this.weighingList.relationId = this.relationId
+              grossWeight(this.weighingList)
+                .toPromise()
+                .then((response) => {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '保存成功',
+                  })
+                  this.$router.go(-1)
+                })
+                .catch((response) => {
+                  // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                })
+            } else if (this.tpyeNo == 2) {
+              this.weighingList.warehouseId = this.warehouseId
+              tare(this.weighingList)
+                .toPromise()
+                .then((response) => {
+                  this.$notify.success({
+                    title: '成功',
+                    message: '保存成功',
+                  })
+                  this.$router.go(-1)
+                })
+                .catch((response) => {
+                  // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                })
+            }
+          })
+          .catch(() => {
+            return false
+          })
     },
   },
 }
@@ -279,9 +268,6 @@ console.log("dfsgfgdgdsgszdf")
   width: 100%;
   display: inline;
 }
-//  .ws-info-table .widthChange {
-//    width: 51%;
-// }
 /deep/.ws-info-table .el-form-item .el-form-item__label {
   width: 30%;
   text-align: center;
@@ -349,7 +335,7 @@ console.log("dfsgfgdgdsgszdf")
   text-align: center;
   margin: 20px auto;
 }
-.css1{
+.butCss {
   opacity: 0;
 }
 </style> 

+ 31 - 14
src/views/outboundManagement/component/route.js

@@ -14,14 +14,14 @@ const outboundManagementRouter = {
     children: [
         // 检斤管理
         {
-            path: 'weighingManagement',
+            path:'weighingManagement',
             component: () =>
                 import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/weighingManagement'),
-            name: 'weighingManagement',
+            name:'weighingManagement',
             meta: {
-                title: 'weighingManagement',
-                shortcutEntrance: 'outboundManagement',
-                module: 'procurement.procurementOrder.delete',
+                title:'weighingManagement',
+                shortcutEntrance:'outboundManagement',
+                module:'procurement.procurementOrder.delete',
                 permissicon: [],
                 keepAlive: true
             }
@@ -31,25 +31,42 @@ const outboundManagementRouter = {
             path: 'qualityInspectionManagement',
             component: () =>
                 import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/qualityInspectionManagement'),
-            name: 'qualityInspectionManagement',
+            name:'qualityInspectionManagement',
             meta: {
-                title: 'qualityInspectionManagement',
-                shortcutEntrance: 'outboundManagement',
-                module: 'procurement.procurementOrder.delete',
+                title:'qualityInspectionManagement',
+                shortcutEntrance:'outboundManagement',
+                module:'procurement.procurementOrder.delete',
                 permissicon: [],
                 keepAlive: true
             }
         },
+        // 查看/编辑质检信息
+        {
+            path: 'qualityInspection',
+            component: () =>
+              import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/qualityInspection'),
+            name: 'qualityInspection',
+            meta: {
+              title: 'qualityInspection',
+              shortcutEntrance: 'qualityInspection',
+              
+              module: 'procurement.procurementOrder.delete',
+              permissicon: [],
+              keepAlive: true
+            },
+            hidden: true
+          },
+
         // 付款管理
         {
-            path: 'collectionManagement',
+            path:'collectionManagement',
             component: () =>
                 import(/* webpackChunkName: "sparepartList" */ '@/views/outboundManagement/collectionManagement'),
-            name: 'collectionManagement',
+            name:'collectionManagement',
             meta: {
-                title: 'collectionManagement',
-                shortcutEntrance: 'outboundManagement',
-                module: 'procurement.procurementOrder.delete',
+                title:'collectionManagement',
+                shortcutEntrance:'outboundManagement',
+                module:'procurement.procurementOrder.delete',
                 permissicon: [],
                 keepAlive: true
             }

+ 392 - 0
src/views/outboundManagement/qualityInspection.vue

@@ -0,0 +1,392 @@
+<!--质检信息-->
+<template>
+  <div class="center">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left titleup">{{ information }}质检信息</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+    <div class="substance">
+      <ws-form>
+        <div style="width: 50%; margin: 0 auto">
+          <div class="title">基本信息</div>
+          <ws-info-table>
+            <ws-form-item label="合同编号" span="1" prop="contractNo">
+              <ws-input
+                v-model="inspect.contractNo"
+                placeholder="请输入合同编号"
+                maxlength="100"
+                disabled
+                size="small"
+              />
+            </ws-form-item>
+            <ws-form-item label="仓位号" span="1" prop="binNumber">
+              <ws-input
+                v-model="inspect.binNumber"
+                placeholder="请输入仓位号"
+                maxlength="100"
+                disabled
+                size="small"
+              />
+            </ws-form-item>
+            <ws-form-item label="囤位号" span="1" prop="storageTagNo">
+             <ws-input
+                v-model="inspect.storageTagNo"
+                placeholder="请输入囤位号"
+                maxlength="100"
+                disabled
+                size="small"
+              />
+            </ws-form-item>
+            <ws-form-item label="车牌号" span="1" prop="carNumber">
+               <ws-input
+                v-model="inspect.carNumber"
+                placeholder="请输入车牌号"
+                maxlength="100"
+                disabled
+                size="small"
+              />
+            </ws-form-item>
+            <ws-form-item label="货名" span="1" prop="goodsName">
+              <ws-input
+                v-model="inspect.goodsName"
+                placeholder="请输入货名"
+                maxlength="100"
+                disabled
+                size="small"
+              />
+            </ws-form-item>
+          </ws-info-table>
+
+          <div class="title">质检数据</div>
+          <ws-info-table>
+            <ws-form-item label="等级" span="1" prop="grade">
+              <ws-select
+                v-model="inspect.grade"
+                placeholder="请输入等级"
+                class="typeselect"
+                @change="waterContentChange"
+                :disabled="disabled"
+              >
+                <ws-option
+                  v-for="item in gradeList"
+                  :key="item.constKey"
+                  :label="item.constValue"
+                  :value="item.constValue"
+                />
+              </ws-select>
+            </ws-form-item>
+            <ws-form-item label="杂质(%)" span="1" prop="impurity">
+              <ws-input
+                v-model="inspect.impurity"
+                placeholder="请输入杂质占比"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="水分(%)" span="1" prop="waterContent">
+              <ws-input
+                v-model="inspect.waterContent"
+                placeholder="请输入水分占比"
+                maxlength="100"
+                size="small"
+                @change = "waterContentChange"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
+              <ws-input
+                v-model="inspect.mildewGrain"
+                placeholder="请输入霉变粒占比"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
+              <ws-input
+                v-model="inspect.bulkDensity"
+                placeholder="请输入容重"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
+              <ws-input
+                v-model="inspect.jiaorenli"
+                placeholder="请输入热损伤占比"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+            <ws-form-item label="不完整粒(%)" span="1" prop="imperfectGrain">
+              <ws-input
+                v-model="inspect.imperfectGrain"
+                placeholder="请输入不完整粒占比"
+                maxlength="100"
+                size="small"
+                :disabled="disabled"
+              />
+            </ws-form-item>
+          </ws-info-table>
+          <div class="but">
+            <el-button @click="cancel" v-if="this.types != 2" type="primary"
+              >取消</el-button
+            >
+            <el-button @click="print" v-if="this.types != 2" type="primary"
+              >提交</el-button
+            >
+            <el-button @click="cancel" v-if="this.types == 2" type="primary"
+              >关闭</el-button
+            >
+          </div>
+        </div>
+      </ws-form>
+    </div>
+  </div>
+</template>
+<script>
+import {
+  addOut,
+  getinspectLook,
+} from '@/model/outboundManagement/index'
+import { packList } from '@/model/contarct/index'
+// import houseSelfCollectPrint from './houseSelfCollectPrint.vue'
+export default {
+  components: {
+    //houseSelfCollectPrint,
+  },
+  watch: {},
+  data() {
+    return {
+      inspect: {},
+      disabled: false,
+      types: '1',
+      information : '添加',
+      goodnameList: [],
+      gradeList: [],
+      customerList: [],
+      getbinNumberList: [],
+      cangid: '', //仓库id
+      warehouseName:'',
+       unitPrice:0,
+       count:0,
+       cangNo:'',
+    }
+  },
+  activated() {
+    this.types = this.$route.query.type
+    this.cangid = this.$route.query.cangid
+    this.warehouseName = this.$route.query.warehouseName
+    this.inspect.contractNo = this.$route.query.contractNo
+    this.inspect.binNumber = this.$route.query.binNumber
+    this.inspect.carNumber = this.$route.query.carNumber
+    this.inspect.goodsName = this.$route.query.goodsName
+    this.inspect.storageTagNo = this.$route.query.storageTagNo
+    //this.inspect.personCharge = this.$route.query.personCharge
+    let id = this.$route.query.id
+    this.cangNo = this.$route.query.warehouseNo
+    this.count = Number(this.$route.query.count)+1 
+    if (this.types == 2) {
+      this.disabled = true
+      this.information = '查看'
+    }
+    // this.calculation()
+    this.getList(id)
+  },
+  methods: {
+    getdate() {
+      var date = new Date()
+      var year = date.getFullYear() //获取完整的年份(4位)
+      var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+      var datetime = date.getDate() //获取当前日(1-31)
+      if (mouth < 10) {
+        mouth = '0' + mouth
+      }
+      if (datetime < 10) {
+        datetime = '0' + datetime
+      }
+      return year + mouth + datetime
+    },
+    // calculation() {
+    //   let number ='000'+ this.count
+    //   number = number.substring(number.length - 4,number.length)
+    //   this.inspect.qualityNo = 'SGRK' + this.getdate()+this.cangNo+number //SGRK+8位时间+3位仓库编号+4位序列号
+    //   // + this.verifyinit()
+    // },
+    print() {
+      this.inspect.warehouseName = this.warehouseName
+      this.inspect.id = this.$route.query.id
+      this.inspect.qualityInspector = sessionStorage.getItem('ws-pf_staffName')
+          this.inspect.compId = sessionStorage.getItem('ws-pf_compId')
+      // if(this.types == null || this.types == ''){
+         this.$confirm('确定保存质检信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          
+          addOut(this.inspect)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('保存成功')
+              // this.xx = true;
+              // let newstr = document.getElementById('print').innerHTML
+              // let oldstr = document.body.innerHTML
+              // document.body.innerHTML = newstr
+              // window.print()
+              // document.body.innerHTML = oldstr
+              // // window.location.reload()
+              this.$router.push({ path: 'qualityInspectionManagement' })
+            })
+        })
+        .catch(() => {
+          return false
+        })
+
+      // }else if(this.types == 1){
+      //    this.$confirm('确定保存质检信息?', '提示', {
+      //   confirmButtonText: '确定',
+      //   cancelButtonText: '取消',
+      //   type: 'warning',
+      // })
+      //   .then(() => {
+      //     // return
+      //     getinspectEdit(this.inspect)
+      //       .toPromise()
+      //       .then((response) => {
+      //         this.$message.success('修改成功')
+      //         // this.xx = true;
+      //         // let newstr = document.getElementById('print').innerHTML
+      //         // let oldstr = document.body.innerHTML
+      //         // document.body.innerHTML = newstr
+      //         // window.print()
+      //         // document.body.innerHTML = oldstr
+      //         // window.location.reload()
+      //         this.$router.push({ path: 'paymentManagement' })
+      //       })
+      //   })
+      //   .catch(() => {
+      //     return false
+      //   })
+
+      // }
+     
+    },
+    cancel() {
+      this.$router.push({ path: 'qualityInspectionManagement' })
+    },
+    getList(ids) {
+      // 品级
+      packList({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      if (this.types == 2) {
+        //查看
+        getinspectLook({ id: ids })
+          .toPromise()
+          .then((response) => {
+            this.inspect = response
+          })
+      }
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.center {
+  background: #f6f7fc;
+}
+
+.ws-info-table {
+  border: none;
+}
+.ws-info-table .el-form-item {
+  width: 50%;
+  border: none;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 30%;
+  text-align: center;
+  background: #ffffff;
+  font-size: 14px;
+  color: #8890b1;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  border: none;
+}
+.title {
+  font-size: 16px;
+  font-weight: 600;
+  margin: 10px;
+}
+.titleup {
+  position: relative;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 15px;
+  background: #8890b1;
+  margin-right: 5px;
+}
+
+.substance {
+  background: #ffffff;
+  width: 100%;
+  border-radius: 4px;
+  margin: 0 auto;
+  padding-top: 20px;
+}
+/deep/.el-table .el-table__header .cell,
+.el-table .el-table__body .cell {
+  text-align: center;
+}
+/deep/.el-table--enable-row-transition .el-table__body td {
+  text-align: center;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 15px 0px;
+}
+.titleup {
+  position: relative;
+}
+.titleup::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.but {
+  text-align: center;
+  margin: 20px auto;
+}
+</style>

+ 222 - 0
src/views/outboundManagement/qualityInspectionManagement.vue

@@ -0,0 +1,222 @@
+<!--质检管理-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="12">
+      <template slot="right">
+        <ws-select
+          v-model="warehouseName"
+          placeholder=""
+          @change="selecttaskType"
+          :value="searchType"
+        >
+          <ws-option
+            v-for="item in warehouseList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+            style="color: #8890b1"
+          />
+        </ws-select>
+        <div></div>
+        <ws-input
+          v-model="searchKeyWord"
+          placeholder="可按合同编号、车牌号查找"
+          clearable
+          maxlength="500"
+          type="input"
+        ></ws-input>
+        <ws-button class="find" type="primary" @click="find()"
+          ><img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
+      </template>
+    </BaseHeaderLayout>
+    <el-table
+      :data="inspect"
+      style="width: 100%; margin-top: 20px"
+      ref="inspect"
+      border
+      height="780"
+    >
+      <el-table-column type="index" label="序号" width="50">
+        <template scope="scope">
+          <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+          <span v-else>{{ scope.$index + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="contractNo" label="合同编号"></el-table-column>
+      <el-table-column prop="carNumber" label="车牌号"></el-table-column>
+      <el-table-column prop="goodsName" label="货名"></el-table-column>
+       <el-table-column prop="bulkDensity" label="容重(克/升)"></el-table-column>
+      <el-table-column prop="waterContent" label="水分(%)"></el-table-column>
+      <el-table-column prop="binNumber" label="仓位号"></el-table-column>
+      <el-table-column prop="storageTagNo" label="囤位号"></el-table-column>
+      <el-table-column prop="qualityInspector" label="质检员"></el-table-column>
+      <el-table-column prop="updateDate" label="质检时间"></el-table-column>
+      <el-table-column prop="status" label="状态"></el-table-column>
+      <el-table-column width="300" label="操作">
+        <template slot-scope="scope">
+          <span v-if="scope.row.status == '已质检'"><el-button @click="qualityInspection(scope.row, 2)">查看</el-button></span>
+          <span v-if="scope.row.status == '已称皮重' || scope.row.status == '' || scope.row.status == null"><el-button @click="qualityInspection(scope.row, 1)">质检</el-button></span>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div style="text-align: center">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal"
+      >
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+import {
+  selectWarehouseSelf,
+  getinspectList,
+} from '@/model/outboundManagement/index'
+
+export default {
+  components: {},
+  watch: {},
+  data() {
+    return {
+      //分页
+      currentPage: 1,
+      pageSize: 10,
+      deptCircularPage: {},
+      deptBudgetTotal: 0,
+
+      searchKeyWord: '',
+      taskTypeList: [],
+      searchType: 0,
+      warehouseName: '',
+      inspect: [],
+      warehouseList: [],
+      cangid: '', //仓库id
+    }
+  },
+  activated() {
+    this.getList()
+  },
+  methods: {
+    find(){
+     this.getList()
+    },
+    qualityInspection(row, index) {
+      //添加/查看
+      console.log(row.id, 'id值')
+      this.$router.push({
+        path: 'qualityInspection',
+        query: { type: index, cangid: this.cangid, id: row.id ,warehouseName:this.warehouseName,count:this.warehouseCount,
+        warehouseNo:this.warehouseNo,contractNo:row.contractNo,binNumber:row.binNumber,carNumber:row.carNumber,
+        storageTagNo:row.storageTagNo,goodsName:row.goodsName},
+      })
+    },
+    selecttaskType(e) {
+      console.log(e)
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    getList() {
+      selectWarehouseSelf({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        personCharge: sessionStorage.getItem('ws-pf_staffName'),
+      })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList = []
+          for (let i = 0; i < response.length; i++) {
+            this.warehouseList.push({
+              // valueKey: i,
+              value: response[i].warehouseName,
+              id: response[i].id,
+            })
+          }
+          this.warehouseName = response[0].warehouseName
+          this.cangid = response[0].id
+        })
+
+      getinspectList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchKeyWord: this.searchKeyWord,
+        warehouseName: this.warehouseName,
+      })
+        .toPromise()
+        .then((response) => {
+          // for (let i = 0; i < response.length; i++) {
+          //   this.warehouseList.push({
+          //     valueKey: i,
+          //     value: response[i].warehouseName,
+          //     id:response[i].id
+          //   })
+          // }
+          // this.searchTypeText = response[0].warehouseName
+          // this.id = response[0].id
+          // console.log(response)
+          this.inspect = response.records
+          console.log(this.inspect,'容重')
+          this.deptBudgetTotal = response.total
+        })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.title {
+  font-size: 20px;
+  font-weight: 600;
+  margin: 20px 0 0 20px;
+}
+.tit {
+  font-size: 16px;
+  font-weight: 600;
+  margin: 20px;
+}
+.ws-info-table {
+  border: none;
+}
+.ws-info-table .el-form-item {
+  width: 50%;
+  border: none;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 30%;
+  text-align: center;
+  background: #ffffff;
+  color: #8890b1;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  border: none;
+}
+/deep/.el-table .el-table__header .cell,
+.el-table .el-table__body .cell {
+  text-align: center;
+}
+/deep/.el-table--enable-row-transition .el-table__body td {
+  text-align: center;
+}
+</style>