ccjgmwz 3 年之前
父節點
當前提交
3dce966564

+ 1 - 1
public/static/print.html

@@ -44,7 +44,7 @@
           <div class="name">{{name}}价格对照表(按水分)</div>
           <div class="price">价格单位:元/公斤</div>
         </div>
-         <el-table :data="tableData" style="width: 600px" :row-class-name="tableRowClassName">
+         <el-table :data="tableData" style="width: 600px" :row-class-name="tableRowClassName" :row-style="{height:'45px'}">
            <el-table-column prop="waterMin" label="水分下限(%)">
            </el-table-column>
            <el-table-column prop="waterMax" label="水分上限(%)">

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

@@ -78,7 +78,6 @@
     purchasePriceLook,
     purchasePriceDel
   } from '@/model/houseSelfCollect/index'
-  import acquisitionManagementAdd from './acquisitionManagementAdd.vue'
   import {
     getHp
   } from '@/utils/getHasPermission'
@@ -268,7 +267,7 @@
           // this.tableData = response.records
           // this.getList()
           localStorage.setItem('pricePrintList', JSON.stringify(response.detailPrints));
-          window.open( "../../../static/print.html?name=" + row.goodsName)
+          window.open( '../../../static/print.html?name=' + row.goodsName)
         })
       },
       validate() {

+ 40 - 22
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -353,7 +353,7 @@
           this.getData()
           break;
         case '审核中':
-          // this.isEdit = false;
+          this.isEdit = true;
           this.submitName = '通过'
           this.getData()
           break;
@@ -381,6 +381,10 @@
           this.makeLookPriceList()
           if(this.$route.query.type != '新增'){
                let _data = this.priceList
+              this.checkList1 = []
+              this.checkList2 = []
+              this.checkList3 = []
+              this.checkList4 = []
               for (let i = 0; i < _data.length; i++) {
                 if (i == 0) this.checkList1 = _data[i].checkList
                 if (i == 1) this.checkList2 = _data[i].checkList
@@ -484,6 +488,11 @@
       // 复选框变化监听
       changeLevel(val, index) {
         let _data = this.priceList
+        
+        this.checkList1 = []
+        this.checkList2 = []
+        this.checkList3 = []
+        this.checkList4 = []
         for (let i = 0; i < _data.length; i++) {
           let _childData = _data[i].checkList
           for (let k = 0; k < _childData.length; k++) {
@@ -737,7 +746,7 @@
           if (_baseWaterValidate(100, 100000, '', '', 'saleLimit', parseFloat(this.baseInfoForm.saleLimit))) {
             that.$message.error('销售上限输入错误!');
           } else {
-            this.$message.error('销售上限不能为空!');
+            that.$message.error('销售上限不能为空!');
           }
           return false
         }
@@ -750,7 +759,7 @@
           if (_item.basicUnitPrice == '' || _baseWaterValidate(0, 50, 2, '', 'deductWeight', parseFloat(_item
               .basicUnitPrice))) {
             if (_item.basicUnitPrice == '') {
-              this.$message.error('基准单价不能为空!');
+              that.$message.error('基准单价不能为空!');
             } else {
               that.$message.error('基准单价输入错误,0-50数字最多保留两位小数!');
             }
@@ -760,13 +769,14 @@
             this.$message.error('等级不能为空!');
             return false
           }
+          var arr = []
           for (let j = 0; j < _item.detailList.length; j++) {
             let _item1 = _item.detailList[j]
             if (_item1.type == 4) {
               if (_item1.jfprice == '' || _baseWaterValidate(0, 100, 3, '', 'deductWeight', parseFloat(_item1
                   .jfprice))) {
                 if (_item1.jfprice == '') {
-                  this.$message.error('降幅价格不能为空!');
+                  that.$message.error('降幅价格不能为空!');
                 } else {
                   that.$message.error('降幅输入错误!');
                 }
@@ -775,14 +785,19 @@
             } else {
               if (_item1.water == '' || _baseWaterValidate(0, 100, 1, 0.5, 'waterBase', parseFloat(_item1.water))) {
                 if (_item1.water == '') {
-                  this.$message.error('分界水分不能为空!')
+                  that.$message.error('分界水分不能为空!')
                 } else {
                   that.$message.error('分界值输入错误!');
                 }
                 return false
               }
+              arr.push(_item1.water)
             }
           }
+          if(!this.isIncrease(arr,arr.length)){
+            that.$message.error('水分大小排序错误!');
+            return false
+          }
         }
         return true
       },
@@ -797,6 +812,12 @@
         this.checkList = [...new Set(_list)];
         console.log(this.checkList)
       },
+      isIncrease(arr,len){
+        if(len == 1){
+          return true
+        }
+        return (arr[len - 2] <= arr[len - 1]) && this.isIncrease(arr,len - 1)
+      },
       // 提交
       submit() {
           let isValidate = false
@@ -960,22 +981,21 @@
 
             //获取基准在x轴索引
 
-              let index = function(){
-              for(let index=0;index<_priceList[i].detailList.length;index++){
-                        if(_priceList[i].detailList[index].water==that.baseInfoForm.waterBase){
-                          return index
-                }
-              }
-           } 
-           console.log(index())
-          for (let j = index(); j > 0; j--) {
+          let index = 0
+          for(;index<_priceList[i].detailList.length;index++){
+              if(_priceList[i].detailList[index].water==that.baseInfoForm.waterBase){
+                break
+            }
+          }
+           console.log(index)
+          for (let j = index; j >= 0; j--) {
               if (_priceList[i].detailList[j] && _priceList[i].detailList[j].type != 4) {
                 if (_priceList[i].detailList[j].type != 1) {
                   let baseprice = ''
-                  if (j == index()) {
+                  if (j == index) {
                     baseprice = parseFloat(_priceList[i].basicUnitPrice)
                   } else {
-                    baseprice = parseFloat(_priceList[i].basicUnitPrice + (parseFloat(_priceList[i].detailList[j + 2]
+                    baseprice = parseFloat(parseFloat(_priceList[i].basicUnitPrice) + (parseFloat(_priceList[i].detailList[j + 2]
                       .water) - parseFloat(_priceList[i].detailList[j].water)) / 0.1 * parseFloat(_priceList[i]
                       .detailList[j + 1].jfprice))
                   }
@@ -1020,14 +1040,14 @@
             // }
             this.left.push(_leftObj)
             console.log('this.left', this.left)
-                  for (let k = index(); k <= _priceList[i].detailList.length; k++) {
+                  for (let k = index; k <= _priceList[i].detailList.length; k++) {
               if (_priceList[i].detailList[k] && _priceList[i].detailList[k].type != 4) {
                 if (_priceList[i].detailList[k].type != 3) {
                   let baseprice = ''
-                  if (k == index()) {
+                  if (k == index) {
                     baseprice = parseFloat(_priceList[i].basicUnitPrice)
                   } else {
-                    baseprice = parseFloat(_priceList[i].basicUnitPrice - (parseFloat(_priceList[i].detailList[k]
+                    baseprice = parseFloat(parseFloat(_priceList[i].basicUnitPrice) - (parseFloat(_priceList[i].detailList[k]
                       .water) - parseFloat(_priceList[i].detailList[k - 2].water)) / 0.1 * parseFloat(_priceList[i]
                       .detailList[k - 1].jfprice))
                   }
@@ -1075,8 +1095,6 @@
             this.right.push(_rightObj)
             console.log('this.right', this.right)
           }
-            debugger
-
         }
       },
       // 获取当前价格左右价格区间数据
@@ -1104,7 +1122,7 @@
           let tmp = ''
           for (let k = 0; k < _list.length; k++) {
             if (_waterMax >= _list[k].priceEnd && _waterMax < _list[k].priceStart) {
-              tmp = parseFloat(_list[k].baseprice + _list[k].jfprice * ((_list[k].priceStart - (_waterMax )) / 0.1 + 1))
+              tmp = parseFloat(_list[k].baseprice + _list[k].jfprice * ((_list[k].priceStart - (_waterMax )) / 0.1))
             }
           }
           _listResult.push(tmp)

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

@@ -236,7 +236,7 @@
         console.log(this.getdate())
         let number = '000' + this.count
         number = number.substring(number.length - 4, number.length)
-        this.inspect.qualityNo = 'ZCRK' + this.getdate() + this.cangNo + number //ZCRK+8位时间+3位仓库编号+4位序列号
+        this.inspect.qualityNo = 'SGRK' + this.getdate() + this.cangNo + number //SGRK+8位时间+3位仓库编号+4位序列号
       },
       closeDialog() {
         html2canvas(this.$refs.saveImg.$el).then(canvas => {

+ 31 - 8
src/views/houseSelfCollect/paymentManagement.vue

@@ -3,9 +3,24 @@
   <div>
     <BaseHeaderLayout :leftSpan="16">
       <template slot="left">
-        <ws-button type="primary" @click="screen(2)">待结算</ws-button>
+        <!-- <ws-button type="primary" @click="screen(2)">待结算</ws-button>
         <ws-button type="primary" @click="screen(0)">待审核</ws-button>
-        <ws-button type="primary"  @click="screen()">全部</ws-button>
+        <ws-button type="primary"  @click="screen()">全部</ws-button> -->
+        <ws-button
+            :type="searchType == 0 ? 'primary' : ''"
+            @click="screen(0)"
+            >待审核</ws-button
+          >
+          <ws-button
+            :type="searchType == 2 ? 'primary' : ''"
+            @click="screen(2)"
+            >待结算</ws-button
+          >
+          <ws-button
+            :type="searchType == -1 ? 'primary' : ''"
+            @click="screen(-1)"
+            >全部</ws-button
+          >
         <ws-button type="primary" @click="reject" v-if="isShowAdopt">驳回</ws-button>
         <ws-button type="primary" @click="adopt" v-if="isShowAdopt">通过</ws-button>
         <!-- <ws-button type="primary" @click="handlepass" v-if="isShowAdopt">审核</ws-button> -->
@@ -95,23 +110,23 @@
         <template scope="scope">
           
           <el-button
-            v-if="(!scope.row.approveStatus || scope.row.approveStatus == '待结算')&& scope.row.status == '待结算'"
+            v-show="(!scope.row.approveStatus || scope.row.approveStatus == '待结算')&& scope.row.status == '待结算'"
             @click="settlement(1, scope.row)"
             v-hasPermission="`acquisitionManagement.acquisitionPay.add`"
           >结算</el-button>
           <el-button
-            v-if="scope.row.approveStatus || scope.row.status == '已驳回'"
+            v-show="scope.row.approveStatus || scope.row.status == '已驳回'"
             @click="settlement(2, scope.row)"
             v-hasPermission="`acquisitionManagement.acquisitionPay.view`"
           >查看</el-button>
           <el-button
-            v-if=" scope.row.approveStatus || scope.row.status == '已驳回' || userJurisdiction "
+            v-show=" scope.row.approveStatus || scope.row.status == '已驳回' || userJurisdiction "
             @click="print(scope.row)"
             v-hasPermission="`acquisitionManagement.acquisitionPay.print`"
           >打印</el-button>
           <el-button
             type="danger"
-            v-if="(!scope.row.approveStatus || scope.row.approveStatus == '待结算')&& scope.row.status == '待结算'"
+            v-show="(!scope.row.approveStatus || scope.row.approveStatus == '待结算')&& scope.row.status == '待结算'"
             @click="del(scope.row)"
             v-hasPermission="`acquisitionManagement.acquisitionPay.delete`"
           >删除</el-button>
@@ -214,7 +229,7 @@ export default {
       deptCircularPage: {},
       deptBudgetTotal: 0,
       paymentForm: false,
-      searchType: '',
+      searchType: -1,
       searchTypeText: '',
       searchKeyWord: '',
       warehouseList: [],
@@ -307,11 +322,19 @@ export default {
       )
     },
     getList() {
+      this.payments = {
+        amountNotPayable: 0,
+        paymentDate: ''
+      }
+      var searchParam = ''
+      if(this.searchType != -1){
+        searchParam = this.searchType
+      }
       getpayment({
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         searchKeyWord: this.searchKeyWord,
-        searchType: this.searchType,
+        searchType: searchParam,
         warehouseName: this.warehouseName,
         managementType: 1
       })

+ 4 - 2
src/views/houseSelfCollect/settlement.vue

@@ -404,7 +404,7 @@
     >
       <paymentPrint :printData="printData" ref="saveImg"></paymentPrint>
       <div style="text-align:center">
-        <el-button type="primary" @click="closePrint">关闭</el-button>
+        <el-button type="primary" @click="closeDialog">关闭</el-button>
         <!-- <el-button type="primary" @click="printSmall">打印小票</el-button> -->
         <el-button type="primary" @click="printBig">打印单据</el-button>
       </div>
@@ -460,6 +460,7 @@ export default {
         let dataURL = canvas.toDataURL('image/png')
         this.imgUrl = dataURL
         if (this.imgUrl !== '') {
+          debugger
           let b = this.dataURLtoFile(this.imgUrl, 'printImage')
           let formdata = new FormData()
           formdata.append('file', b)
@@ -473,12 +474,13 @@ export default {
             settlementEdit(this.paymentList)
               .toPromise()
               .then((response) => {})
+            this.paymentList = [] 
+
           })
           this.dialogTableVisible = true
           
         }
       })
-      this.paymentList = [] 
       this.isShowPrint = false
       this.$router.push({path:'paymentManagement'})
     },

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

@@ -97,7 +97,7 @@
         <template slot-scope="scope">
           <el-button @click="weightCheck(scope.row, 1)" v-if=" scope.row.status == '已称毛重' || scope.row.status == '已质检' " v-hasPermission="`acquisitionManagement.acquisitionWeight.mao`" >毛重</el-button >
           <!-- scope.row.paymentManagement.status == '待结算' && -->
-          <el-button :disabled = "scope.row.allow == 2" @click="weightCheck(scope.row, 2)"  v-if="scope.row.status == '已称毛重' || scope.row.status == '已称皮重' " v-hasPermission="`acquisitionManagement.acquisitionWeight.weight`">皮重</el-button>
+          <el-button :disabled = "scope.row.allow == 2" @click="weightCheck(scope.row, 2)"  v-if=" (scope.row.status == '已称毛重' || scope.row.status == '已称皮重') " v-hasPermission="`acquisitionManagement.acquisitionWeight.weight`">皮重</el-button>
           <el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重'" v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button >
         </template>
       </el-table-column>
@@ -163,7 +163,7 @@ export default {
         qualityInspectionManagement:{},
       },
       purchasePriceList:[],
-      allowEdit:"",
+      allowEdit:'',
       disabled:false
     }
   },
@@ -282,10 +282,8 @@ export default {
         .then((response) => {
           for(let i = 0 ; i < response.records.length ; i++){
             if(response.records[i].paymentManagement){
-              if(response.records[i].paymentManagement.status == '待结算'){
-                  response.records[i].allow = 1
-              }else{
-                response.records[i].allow = 2
+              if(response.records[i].paymentManagement.approveStatus || response.records[i].paymentManagement.status != '待结算'){
+                  response.records[i].allow = 2
               }
             }else{
               response.records[i].allow = 1

+ 25 - 22
src/views/houseSelfCollect/weightCheck.vue

@@ -21,15 +21,18 @@
         <h2 class="bg-left titleup">实时监控</h2>
         <div class="bottom">
           <div class="video1">
-            <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" v-if="!video1Src">
+            <!-- <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" v-if="!video1Src">
             <div v-if="!video1Src">监控视频未连接</div>
             <video v-if="video1Src" controls="controls" :src="video1Src"  autoplay="autoplay" class="video-content"
-              mediatype="video"></video>
+              mediatype="video"></video> -->
+              <iframe src="http://live.eliangeyun.com/play.html?serial=34020000001110000001&code=34020000001310000001&aspect=fullscreen" width="440" height="360" allowfullscreen allow="autoplay; fullscreen; microphone;"></iframe>
           </div>
           <div class="vide2">
-            <img src="../../../public/img/quesheng@2x.png" alt="" class="img2" v-if="!video2Src">
+            <!-- <img src="../../../public/img/quesheng@2x.png" alt="" class="img2" v-if="!video2Src">
             <div v-if="!video2Src">监控视频未连接</div>
-            <video src="" v-if="video2Src" class="video-content"></video>
+            <video src="" v-if="video2Src" class="video-content"></video> -->
+            <iframe src="http://live.eliangeyun.com/play.html?serial=34020000001110000001&code=34020000001310000002&aspect=fullscreen" width="440" height="360" allowfullscreen allow="autoplay; fullscreen; microphone;"></iframe>
+          
           </div>
         </div>
       </div>
@@ -93,7 +96,7 @@
             </div>
           </div>
           <div class="bottom">
-            <el-table ref="singleTable" :data="carList" height="250" highlight-current-row
+            <el-table ref="singleTable" :data="carList" height="550" highlight-current-row
               @current-change="handleCurrentChange" style="width: 100%;overflow:auto">
               <el-table-column property="number" label="编号">
               </el-table-column>
@@ -150,8 +153,8 @@
     getweighingList
   } from '@/model/houseSelfCollect/index'
   import weightCheckPrint from './component/weightCheckPrint.vue'
-  import html2canvas from "html2canvas"
-  import axios from "axios"
+  import html2canvas from 'html2canvas'
+  import axios from 'axios'
   export default {
     components: {
       weightCheckPrint,
@@ -165,8 +168,8 @@
         pList: [],
         mList: [],
         index: 0,
-        video1Src: '',
-        video2Src: '',
+        video1Src: 'http://live.eliangeyun.com/play.html?serial=34020000001110000001&code=34020000001310000001',
+        video2Src: 'http://live.eliangeyun.com/play.html?serial=34020000001110000001&code=34020000001310000002',
         currentPage: 1,
         pageSize: 10,
         carList: [],
@@ -213,7 +216,7 @@
       }
       this.weighingList.grossWeight = this.$route.query.grossWeight
       this.purchasePriceList = this.$route.query.purchasePriceList
-      console.log(this.purchasePriceList, "上限")
+      console.log(this.purchasePriceList, '上限')
       this.allowEdit = this.$route.query.allowEdit
       if (this.allowEdit == 0) {
         this.disabled = true
@@ -277,7 +280,7 @@
         this.mList = [];
         this.pList = [];
         let that = this
-        console.log(this.common.commonWeighingList, "commonWeighingList")
+        console.log(this.common.commonWeighingList, 'commonWeighingList')
         let _list = this.common.commonWeighingList
         for (let i = 0; i < _list.length; i++) {
           if(_list[i].allow == 2){
@@ -291,7 +294,7 @@
             this.pList.push(_list[i])
           }
         }
-        if (this.information == "毛重") {
+        if (this.information == '毛重') {
           this.index = 0
           this.carList = this.mList
           if (this.mList.length != 0) {
@@ -335,10 +338,10 @@
       },
       tabClick(val) {
         this.index = val
-        if (this.information == "皮重") {
-          this.information = "毛重"
+        if (this.information == '皮重') {
+          this.information = '毛重'
         } else {
-          this.information = "皮重"
+          this.information = '皮重'
         }
         this.getList()
       },
@@ -381,17 +384,17 @@
               this.reader.releaseLock();
               break;
             }
-            var result = "";
+            var result = '';
             //2。获取16进制字符串
             // var receData = HexConvert.ByteToString(value);
             // console.log("receData",receData);
             var flag = false;
             for (var i = 0; i < value.length; i++) {
               var tmp = String.fromCharCode(value[i])
-              if (tmp == "+") {
+              if (tmp == '+') {
                 flag = true
               }
-              if (flag && result.length < 6 && tmp != "+") {
+              if (flag && result.length < 6 && tmp != '+') {
                 result += tmp
               }
             }
@@ -469,7 +472,7 @@
         }
         if (
           this.weighingList.grossWeight < 1 ||
-          this.weighingList.grossWeight > 100000
+          this.weighingList.grossWeight > 200000
         ) {
           this.$message({
             message: '毛重输入错误',
@@ -555,13 +558,13 @@
                 .toPromise()
                 .then((response) => {
                   for (let i = 0; i < this.purchasePriceList.length; i++) {
-                    console.log(this.purchasePriceList, "shangxiang")
+                    console.log(this.purchasePriceList, 'shangxiang')
                     if (
                       this.weighingList.goodsName == this.purchasePriceList[i].goodsName
                     ) {
                       //累计售粮超上限不能完成毛检保存
                       let count = (this.purchasePriceList[i].saleLimit - response / 1000).toFixed(2)
-                      console.log(this.weighingList.grossWeight / 1000, "毛重转吨")
+                      console.log(this.weighingList.grossWeight / 1000, '毛重转吨')
                       if (count - this.weighingList.grossWeight / 1000 < 0) {
                         this.$alert(
                           '该客户累计销售' +
@@ -618,7 +621,7 @@
                     .toPromise()
                     .then((response) => {
                       this.inspect = response
-                      this.inspect.a = "中天"
+                      this.inspect.a = '中天'
                       // this.tableData = response
                       this.isShowPrint = true
                     })

+ 16 - 9
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -712,6 +712,8 @@ import {
   addoreditoutput,
   getGoodsName,
 } from '@/model/tasksport/index'
+
+import { mapGetters } from 'vuex'
 import { pullDown, getstaff } from '@/model/warehouse/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -886,7 +888,7 @@ export default {
     },
     MathRand()
 {
-var Num="";
+var Num='';
 for(var i=0;i<4;i++)
 {
 Num+=Math.floor(Math.random()*10);
@@ -975,14 +977,19 @@ return Num
       }
     },
     selectwarehouseName(e) {
-      //经办人
-      getstaff({ compId: sessionStorage.getItem('ws-pf_compId') ,warehouseId:e})
-        .toPromise()
-        .then((response) => {
-          this.options = response
-          this.staffList = response
-          //  this.agent = response
-        })
+      for(var i=0;i<this.warehouseNameList.length;i++){
+        if(this.warehouseNameList[i].id == e){
+          this.dataList.warehouseName = this.warehouseNameList[i].warehouseName
+          //经办人
+          getstaff({ compId: sessionStorage.getItem('ws-pf_compId') ,warehouseId:e})
+            .toPromise()
+            .then((response) => {
+              this.options = response
+              this.staffList = response
+              //  this.agent = response
+            })
+        }
+      }
     },
     changecontract1(e) {
       if (this.dataList1.taskTypeKey != 3) {