Browse Source

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

mxx 3 năm trước cách đây
mục cha
commit
ac1f95f6a3

+ 14 - 13
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -684,7 +684,7 @@
           if (typeof(_pointVal1) == 'string') _pointVal1 = _pointVal1.length
           let _tobeVal1 = _val1 % point
           if (type == 'waterBase') {
-            if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum && _tobeVal1 == 0) {
+            if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum ) {
               return false
             }
           }
@@ -701,10 +701,10 @@
           }
           return true
         }
-        if (this.baseInfoForm.waterBase == '' || _baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this
+        if (this.baseInfoForm.waterBase == '' || _baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this
             .baseInfoForm.waterBase))) {
-          if (_baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this.baseInfoForm.waterBase))) {
-            that.$message.error('水分基准输入错误,最多保留1位小数,基准水分须可被0.5整除!');
+          if (_baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this.baseInfoForm.waterBase))) {
+            that.$message.error('水分基准输入错误,最多保留1位小数,基准水分须可被0.1整除!');
           } else {
             this.$message.error('基准水分不能为空!');
           }
@@ -731,13 +731,13 @@
           return false
         }
 
-        if (this.baseInfoForm.waterMin == '' || _baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this
+        if (this.baseInfoForm.waterMin == '' || _baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this
             .baseInfoForm.waterMin))) {
           if (this.baseInfoForm.waterMin == '') {
             this.$message.error('干粮水分不能为空!')
           }
-          if (_baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this.baseInfoForm.waterMin))) {
-            that.$message.error('干粮水分输入错误,最多保留1位小数,干粮水分须可被0.5整除!')
+          if (_baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this.baseInfoForm.waterMin))) {
+            that.$message.error('干粮水分输入错误,最多保留1位小数,干粮水分须可被0.1整除!')
           }
           return false
         }
@@ -751,10 +751,10 @@
           return false
         }
 
-        if (this.baseInfoForm.waterMax == '' || _baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this
+        if (this.baseInfoForm.waterMax == '' || _baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this
             .baseInfoForm.waterMax))) {
-          if (_baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this.baseInfoForm.waterMax))) {
-            that.$message.error('水分上限输入错误,最多保留1位小数,干粮水分须可被0.5整除!');
+          if (_baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this.baseInfoForm.waterMax))) {
+            that.$message.error('水分上限输入错误,最多保留1位小数,干粮水分须可被0.1整除!');
           } else {
             this.$message.error('水分上限不能为空!');
           }
@@ -812,7 +812,7 @@
                 return false
               }
             } else {
-              if (_item1.water == '' || _baseWaterValidate(0, 100, 1, 0.5, 'waterBase', parseFloat(_item1.water))) {
+              if (_item1.water == '' || _baseWaterValidate(0, 100, 1, 0.1, 'waterBase', parseFloat(_item1.water))) {
                 if (_item1.water == '') {
                   that.$message.error('分界水分不能为空!')
                 } else {
@@ -853,6 +853,7 @@
           isValidate = this.validate()
          
         if (isValidate) {
+          debugger
           this.makeTableList()
           this.baseInfoForm.details = []
           this.makePriceDataList()
@@ -936,7 +937,7 @@
         let _obj = {}
         let _waterMin = parseFloat(this.baseInfoForm.waterMin)
         let _waterMax = parseFloat(this.baseInfoForm.waterBase)
-        let _count = (_waterMax - _waterMin) / 0.1 
+        let _count = Number(((_waterMax - _waterMin) / 0.1).toFixed(0)) 
         if(this.baseInfoForm.paramType == '2'){
           for (let i = 0; i < _count; i++) {
             // if (i == 0) {
@@ -961,7 +962,7 @@
           _obj = {}
           _waterMin = parseFloat(this.baseInfoForm.waterBase)
           _waterMax = parseFloat(this.baseInfoForm.waterMax)
-          _count = (_waterMax - _waterMin) / 0.1
+          _count = Number(((_waterMax - _waterMin) / 0.1).toFixed(0))
           for (let i = 0; i < _count; i++) {
             // if (i == 0) {
             //   _waterMin += 0.4

+ 33 - 3
src/views/houseSelfCollect/inspectInfo.vue

@@ -74,7 +74,7 @@
               <ws-input type="number" @mousewheel.native.prevent v-model="inspect.tidalGrainPrice" placeholder="请输入净重单价" maxlength="10" size="small" :disabled="disabled2" />
             </ws-form-item>
             <ws-form-item label="干粮单价(元/公斤)" span="1" prop="dryGrainPrice" v-if="inspect.type == '干粮'">
-              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.dryGrainPrice" placeholder="请输入干粮单价" maxlength="10" size="small"  :disabled="disabled" />
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.dryGrainPrice" placeholder="请输入干粮单价" maxlength="10" size="small"  :disabled="disabled2" />
             </ws-form-item>
           </ws-info-table>
 
@@ -423,7 +423,7 @@
             })
             return
           }
-           if(this.inspect.dryGrainPrice < 0 || this.inspect.dryGrainPrice > 1000){
+           if(this.inspect.dryGrainPrice <= 0 || this.inspect.dryGrainPrice > 1000){
             this.$message({
               message:'干粮价格输入错误',
               type:'warning'
@@ -440,6 +440,22 @@
           return
         }
         }
+        else{
+          if(!this.inspect.tidalGrainPrice){
+            this.$message({
+              message:'净重单价不能为空',
+              type:'warning'
+            })
+            return
+          }
+           if(this.inspect.tidalGrainPrice <= 0 || this.inspect.tidalGrainPrice > 1000){
+            this.$message({
+              message:'净重单价输入错误',
+              type:'warning'
+            })
+            return
+          }
+        }
         if (!this.inspect.grade) {
           this.$message({
             message: '等级不能为空',
@@ -769,7 +785,21 @@
               if(this.inspect.paramType == '1'){
                 this.inspect.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.inspect.buckleMiscellaneous)/100*parseFloat(this.inspect.dryGrainPrice)).toFixed(4)
               }else{
-                this.inspect.tidalGrainPrice = response
+                if(this.inspect.type=='干粮'){
+                  if(response == 0){
+                    getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
+                      .toPromise()
+                      .then((response) => { 
+                        this.$set(this.inspect,'dryGrainPrice',response)
+                      })
+                  }
+                  else{
+                    this.inspect.dryGrainPrice = response
+                  }
+                }
+                else{
+                  this.inspect.tidalGrainPrice = response
+                }
               }
             })
         }

+ 12 - 4
src/views/houseSelfCollect/inspectionManagement.vue

@@ -158,7 +158,8 @@
 				isShowPrint: false,
 				printData: {},
 				deductWeight: '', //扣重比
-				saleLimit: ''
+				saleLimit: '',
+				allowEdit:'0'
 			}
 		},
 		activated() {
@@ -195,7 +196,8 @@
 						id: row.id,
 						warehouseName: this.warehouseName,
 						count: this.warehouseCount,
-						warehouseNo: this.warehouseNo
+						warehouseNo: this.warehouseNo,
+						allowEdit:this.allowEdit
 					},
 				})
 			},
@@ -207,6 +209,7 @@
 						this.warehouseCount = this.warehouseList[i].count
 						this.warehouseNo = this.warehouseList[i].No
 						this.cangid = this.warehouseList[i].id
+						this.allowEdit = this.warehouseList[i].allowEdit
 						this.WAREHOUSE[1].payname = this.warehouseList[i].value
 					}
 				}
@@ -269,28 +272,33 @@
 								this.warehouseName = _wareHouse.value
 								this.warehouseNo = _wareHouse.No
 								this.warehouseCount = _wareHouse.count
+								this.allowEdit = _wareHouse.allowEdit
 							} 
 						for (let i = 0; i < response.length; i++) {
 							if(_wareHouse && response[i].warehouseName==_wareHouse.value){
 								this.warehouseCount = response[i].count
+								this.allowEdit = response[i].allowEdit
 							}
 							this.warehouseList.push({
 								value: response[i].warehouseName,
 								id: response[i].id,
 								count: response[i].count,
-								No: response[i].commonWarehouseNo
+								No: response[i].commonWarehouseNo,
+								allowEdit:response[i].allowEdit
 							})
 							if (!_wareHouse) {
-									if (this.cangid && this.cangid == response[i].id) {
+								if (this.cangid && this.cangid == response[i].id) {
 									this.warehouseName = response[i].warehouseName
 									this.warehouseCount = response[i].count
 									this.warehouseNo = response[i].commonWarehouseNo
+									this.allowEdit =  response[i].allowEdit
 								}
 								if (this.warehouseList.length > 0 && !this.cangid) {
 									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.allowEdit = this.warehouseList[0].allowEdit
 									this.WAREHOUSE[1].payname = this.warehouseList[0].value
 								}
 							}

+ 17 - 9
src/views/houseSelfCollect/paymentManagement.vue

@@ -60,7 +60,7 @@
         </ws-button>
       </template>
     </BaseHeaderLayout>
-    <el-table :data="paymentList" style="width: 100%; margin-top: 20px" ref="paymentList" border height="600"
+    <el-table :data="paymentList" style="width: 100%; margin-top: 20px" ref="paymentList" border height="600" 
       @row-click="handleRowClick" @selection-change="handleSelectionChange" :summary-method="getSummaries" show-summary>
       <el-table-column :selectable="selectInit" type="selection" width="55"></el-table-column>
       <el-table-column type="index" label="序号" width="50">
@@ -169,7 +169,7 @@
     </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"
+        :page-sizes="[10, 30, 50, 100,1000,9999]" layout="total, sizes, prev, pager, next, jumper"
         :total="deptBudgetTotal"></el-pagination>
       <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint"
         :title="printData.compName + '结算凭证'">
@@ -496,11 +496,19 @@ import download from '../../components/WsDownload/download'
           .catch(() => {})
       },
       customer(row) {
-        this. customerInfo = true
-        this.customerlist = row.identityAuthenticationInfo
-        this.customerlist.cardAddressUrl1 = this.customerlist.cardAddressUrl.split(',')[0]
-        this.customerlist.cardAddressUrl2 = this.customerlist.cardAddressUrl.split(',')[1]
-        this.customerlist.payeeAddressUrls = this.customerlist.payeeAddressUrl.split(',')
+        getCustomerLook({
+                id: row.identityId,
+                authenticationStatusKey: 7
+              })
+        .toPromise()
+        .then(response => {
+          this. customerInfo = true
+          this.customerlist = response
+          this.customerlist.cardAddressUrl1 = this.customerlist.cardAddressUrl.split(',')[0]
+          this.customerlist.cardAddressUrl2 = this.customerlist.cardAddressUrl.split(',')[1]
+          this.customerlist.payeeAddressUrls = this.customerlist.payeeAddressUrl.split(',')
+        })
+        
       },
       customerclose(e) {
         console.log(e)
@@ -575,7 +583,7 @@ import download from '../../components/WsDownload/download'
           let index2 = 0;
           for (let i = 0; i < this.modification.length; i++) {
             getCustomerLook({
-                id: this.modification[i].identityAuthenticationInfo.id,
+                id: this.modification[i].identityId,
                 authenticationStatusKey: 7
               })
               .toPromise()
@@ -615,7 +623,7 @@ import download from '../../components/WsDownload/download'
           // console.log('批量打印凭证list',this.selectPrintList)
         } else {
           getCustomerLook({
-              id: this.rowData.identityAuthenticationInfo.id,
+              id: this.rowData.identityId,
               authenticationStatusKey: 7
             })
             .toPromise()

+ 13 - 13
src/views/houseSelfCollect/weightCheck.vue

@@ -111,7 +111,7 @@
             </el-table>
             <div style="text-align: center">
               <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
-                :current-page="currentPage" :page-size="deptCircularPage.pageSize"
+                :current-page="currentPage" page-size="100"
                 layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
               </el-pagination>
             </div>
@@ -296,18 +296,18 @@
           })
           .toPromise()
           .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].paymentManagement
-                  .approveStatus) {
-                  response.records[i].allow = 1
-                } else {
-                  response.records[i].allow = 2
-                }
-              } else {
-                response.records[i].allow = 1
-              }
-            }
+            // for (let i = 0; i < response.records.length; i++) {
+            //   if (response.records[i].paymentManagement) {
+            //     if (response.records[i].paymentManagement.status == '待结算' && !response.records[i].paymentManagement
+            //       .approveStatus) {
+            //       response.records[i].allow = 1
+            //     } else {
+            //       response.records[i].allow = 2
+            //     }
+            //   } else {
+            //     response.records[i].allow = 1
+            //   }
+            // }
             this.weighingList = response.records
             this.common.commonWeighingList = response.records
             this.makeData();