Browse Source

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

ccjgmwz 3 years ago
parent
commit
d233269f0f

+ 20 - 6
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -698,16 +698,26 @@
           if (this.baseInfoForm.waterMin == '') {
           if (this.baseInfoForm.waterMin == '') {
             this.$message.error('干粮水分不能为空!')
             this.$message.error('干粮水分不能为空!')
           }
           }
-          return false
           if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase", parseFloat(this.baseInfoForm.waterMin))) {
           if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase", parseFloat(this.baseInfoForm.waterMin))) {
-            that.$message.error('干粮水分输入错误!')
+            that.$message.error('干粮水分输入错误,最多保留1位小数,干粮水分须可被0.5整除!')
           }
           }
           return false
           return false
         }
         }
+        
+        if (this.baseInfoForm.waterBase>this.baseInfoForm.waterMax) {
+            this.$message.error('基准水分须小于水分上限!')
+          return false
+        }
+        
+        if (this.baseInfoForm.waterMin>this.baseInfoForm.waterBase) {
+            this.$message.error('干粮水分须小于基准水分!')
+          return false
+        }
+
         if (this.baseInfoForm.waterMax == '' || _baseWaterValidate(1, 100, 1, 0.5, "waterBase", parseFloat(this
         if (this.baseInfoForm.waterMax == '' || _baseWaterValidate(1, 100, 1, 0.5, "waterBase", parseFloat(this
             .baseInfoForm.waterMax))) {
             .baseInfoForm.waterMax))) {
           if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase", parseFloat(this.baseInfoForm.waterMax))) {
           if (_baseWaterValidate(1, 100, 1, 0.5, "waterBase", parseFloat(this.baseInfoForm.waterMax))) {
-            that.$message.error('水分上限输入错误!');
+            that.$message.error('水分上限输入错误,最多保留1位小数,干粮水分须可被0.5整除!');
           } else {
           } else {
             this.$message.error('水分上限不能为空!');
             this.$message.error('水分上限不能为空!');
           }
           }
@@ -733,7 +743,7 @@
             if (_item.basicUnitPrice == '') {
             if (_item.basicUnitPrice == '') {
               this.$message.error('基准单价不能为空!');
               this.$message.error('基准单价不能为空!');
             } else {
             } else {
-              that.$message.error('基准单价输入错误!');
+              that.$message.error('基准单价输入错误,0-50数字最多保留两位小数!');
             }
             }
             return false
             return false
           }
           }
@@ -780,11 +790,13 @@
       },
       },
       // 提交
       // 提交
       submit() {
       submit() {
+        let isValidate = false
+         isValidate = this.validate()
+                if (isValidate) {
         this.makeTableList()
         this.makeTableList()
         this.baseInfoForm.details = []
         this.baseInfoForm.details = []
         this.makePriceDataList()
         this.makePriceDataList()
         this.baseInfoForm.goodsName = this.selectVal
         this.baseInfoForm.goodsName = this.selectVal
-        let isValidate = false
         switch (this.$route.query.type) {
         switch (this.$route.query.type) {
           case "查看":
           case "查看":
             this.isCountShow = false;
             this.isCountShow = false;
@@ -826,6 +838,8 @@
             }
             }
             break;
             break;
         }
         }
+            }
+
       },
       },
       //审核
       //审核
       audit(item, status, status2) {
       audit(item, status, status2) {
@@ -1441,6 +1455,6 @@
     background: white!important;
     background: white!important;
   }
   }
   #aaa::selection{
   #aaa::selection{
-    background: red;
+    // background: red;
   }
   }
 </style>
 </style>

+ 12 - 0
src/views/houseSelfCollect/settlement.vue

@@ -240,6 +240,7 @@
             <ws-form-item label="称重扣款" span="1" prop="waterContent">
             <ws-form-item label="称重扣款" span="1" prop="waterContent">
               <ws-input
               <ws-input
               @input='grainMoney'
               @input='grainMoney'
+              @focus="inputFocus($event)"
               v-model="paymentList.weighingDeduction"
               v-model="paymentList.weighingDeduction"
                 placeholder="请输入称重扣款"
                 placeholder="请输入称重扣款"
                 maxlength="100"
                 maxlength="100"
@@ -250,6 +251,7 @@
             <ws-form-item label="称重补助" span="1" prop="waterContent">
             <ws-form-item label="称重补助" span="1" prop="waterContent">
               <ws-input
               <ws-input
               @input='grainMoney'
               @input='grainMoney'
+              @focus="inputFocus($event)"
                v-model="paymentList.weighingSubsidy"
                v-model="paymentList.weighingSubsidy"
                 placeholder="请输入称重补助"
                 placeholder="请输入称重补助"
                 maxlength="100"
                 maxlength="100"
@@ -261,6 +263,7 @@
             <ws-form-item label="运费扣款" span="1" prop="waterContent">
             <ws-form-item label="运费扣款" span="1" prop="waterContent">
               <ws-input
               <ws-input
               @input='grainMoney'
               @input='grainMoney'
+              @focus="inputFocus($event)"
                v-model="paymentList.freightDeduction"
                v-model="paymentList.freightDeduction"
                 placeholder="请输入运费扣款"
                 placeholder="请输入运费扣款"
                 maxlength="100"
                 maxlength="100"
@@ -271,6 +274,7 @@
             <ws-form-item label="运费补助" span="1" prop="waterContent">
             <ws-form-item label="运费补助" span="1" prop="waterContent">
               <ws-input
               <ws-input
               @input='grainMoney'
               @input='grainMoney'
+              @focus="inputFocus($event)"
               v-model="paymentList.freightSubsidy"
               v-model="paymentList.freightSubsidy"
                 placeholder="请输入运费补助"
                 placeholder="请输入运费补助"
                 maxlength="100"
                 maxlength="100"
@@ -281,6 +285,7 @@
             <ws-form-item label="卸车扣款" span="1" prop="waterContent">
             <ws-form-item label="卸车扣款" span="1" prop="waterContent">
               <ws-input
               <ws-input
               @input='grainMoney'
               @input='grainMoney'
+              @focus="inputFocus($event)"
               v-model="paymentList.unloadDeduction"
               v-model="paymentList.unloadDeduction"
                 placeholder="请输入卸车扣款"
                 placeholder="请输入卸车扣款"
                 maxlength="100"
                 maxlength="100"
@@ -291,6 +296,7 @@
             <ws-form-item label="卸车补助" span="1" prop="waterContent">
             <ws-form-item label="卸车补助" span="1" prop="waterContent">
               <ws-input
               <ws-input
               @input='grainMoney'
               @input='grainMoney'
+              @focus="inputFocus($event)"
               v-model="paymentList.unloadSubsidy"
               v-model="paymentList.unloadSubsidy"
                 placeholder="请输入卸车补助"
                 placeholder="请输入卸车补助"
                 maxlength="100"
                 maxlength="100"
@@ -301,6 +307,7 @@
             <ws-form-item label="质量扣款" span="1" prop="qualityDeduction">
             <ws-form-item label="质量扣款" span="1" prop="qualityDeduction">
               <ws-input
               <ws-input
               @input='grainMoney'
               @input='grainMoney'
+              @focus="inputFocus($event)"
               v-model="paymentList.qualityDeduction"
               v-model="paymentList.qualityDeduction"
                 placeholder="请输入质量扣款"
                 placeholder="请输入质量扣款"
                 maxlength="100"
                 maxlength="100"
@@ -312,6 +319,7 @@
             <ws-form-item label="其他补助" span="1" prop="waterContent">
             <ws-form-item label="其他补助" span="1" prop="waterContent">
               <ws-input
               <ws-input
               @input='grainMoney'
               @input='grainMoney'
+              @focus="inputFocus($event)"
               v-model="paymentList.otherSubsidy"
               v-model="paymentList.otherSubsidy"
                 placeholder="请输入其他补助"
                 placeholder="请输入其他补助"
                 maxlength="100"
                 maxlength="100"
@@ -323,6 +331,7 @@
             <ws-form-item label="其他扣款" span="1" prop="waterContent">
             <ws-form-item label="其他扣款" span="1" prop="waterContent">
               <ws-input
               <ws-input
               @input='grainMoney'
               @input='grainMoney'
+              @focus="inputFocus($event)"
               v-model="paymentList.otherDeduction"
               v-model="paymentList.otherDeduction"
                 placeholder="请输入其他扣款"
                 placeholder="请输入其他扣款"
                 maxlength="100"
                 maxlength="100"
@@ -439,6 +448,9 @@ export default {
    this.getList()
    this.getList()
   },
   },
   methods: {
   methods: {
+    inputFocus(event){
+      event.currentTarget.select()
+    },
     closeDialog(){
     closeDialog(){
       html2canvas(this.$refs.saveImg.$el).then((canvas) => {
       html2canvas(this.$refs.saveImg.$el).then((canvas) => {
         let dataURL = canvas.toDataURL('image/png')
         let dataURL = canvas.toDataURL('image/png')

+ 63 - 1
src/views/tranManagement/tranManagementShippingArrangemen.vue

@@ -84,7 +84,7 @@
             v-for="(item, index) in deptBudgetList.tranCarInfoList"
             v-for="(item, index) in deptBudgetList.tranCarInfoList"
             :key="index"
             :key="index"
           >
           >
-            <div class="zhong">
+            <div class="zhong" v-show="index==0">
               <ws-form-item label="姓名" span="1" prop="driver">
               <ws-form-item label="姓名" span="1" prop="driver">
                 <el-select
                 <el-select
                   v-if="item.id != null"
                   v-if="item.id != null"
@@ -312,6 +312,58 @@
                   class="ys"
                   class="ys"
                 ></ws-input>
                 ></ws-input>
               </ws-form-item>
               </ws-form-item>
+            </div>
+              <div class="zhong-other"  v-show="index!=0">
+              <ws-form-item
+                label="仓位号"
+                span="1"
+                prop="binNumber"
+                v-show="item.shipType == '散船'"
+                class="item"
+              >
+                <ws-input
+                  v-if="item.id != null"
+                  :disabled="readonly"
+                  v-model="item.binNumber"
+                  placeholder="请输入仓位号"
+                  maxlength="100"
+                  size="small"
+                  style="width: 110px"
+                ></ws-input>
+                <ws-input
+                  v-else
+                  v-model="item.binNumber"
+                  placeholder="请输入仓位号"
+                  maxlength="100"
+                  size="small"
+                  style="width: 110px"
+                ></ws-input>
+              </ws-form-item>
+              <ws-form-item
+                label="重量(吨)"
+                span="1"
+                prop="positionWeight"
+                v-show="item.shipType == '散船'"
+                class="item"
+              >
+                <ws-input
+                  v-if="item.id != null"
+                  :disabled="readonly"
+                  v-model="item.positionWeight"
+                  placeholder="请输入重量"
+                  maxlength="100"
+                  size="small"
+                  style="width: 110px"
+                ></ws-input>
+                 <ws-input
+                 v-else
+                  v-model="item.positionWeight"
+                  placeholder="请输入重量"
+                  maxlength="100"
+                  size="small"
+                  style="width: 110px"
+                ></ws-input>
+              </ws-form-item>
             </div>
             </div>
             <span
             <span
               v-if="(item.status == '未装车'&& item.shipType == '散船') || item.status == null" 
               v-if="(item.status == '未装车'&& item.shipType == '散船') || item.status == null" 
@@ -1348,4 +1400,14 @@ export default {
   height: 10px;
   height: 10px;
   line-height: 0px;
   line-height: 0px;
 }
 }
+.zhong-other{
+  display: flex;
+    margin: 2%;
+    background: #f6f7fc;
+    border-radius: 4px;
+    border: 1px solid #d8dce6;
+    .item{
+      margin: 0;
+    }
+}
 </style>
 </style>

+ 7 - 7
src/views/tranManagement/tranManagementTransporTrainNo.vue

@@ -95,7 +95,7 @@
       >
       >
         <ws-info-table>
         <ws-info-table>
           <!--姓名-->
           <!--姓名-->
-          <ws-form-item label="姓名" span="1" prop="driver">
+          <ws-form-item label="姓名" span="1" prop="driver" v-show="index==0">
             <el-select
             <el-select
               v-model="item.driver"
               v-model="item.driver"
               placeholder="请选择姓名"
               placeholder="请选择姓名"
@@ -112,7 +112,7 @@
             </el-select>
             </el-select>
           </ws-form-item>
           </ws-form-item>
           <!--电话-->
           <!--电话-->
-          <ws-form-item label="电话" span="1" prop="driverPhone">
+          <ws-form-item label="电话" span="1" prop="driverPhone"  v-show="index==0">
             <ws-input
             <ws-input
               v-model="item.driverPhone"
               v-model="item.driverPhone"
               readonly
               readonly
@@ -123,7 +123,7 @@
             />
             />
           </ws-form-item>
           </ws-form-item>
           <!--发车日期-->
           <!--发车日期-->
-          <ws-form-item label="发车日期" span="1" prop="sendDateStart">
+          <ws-form-item label="发车日期" span="1" prop="sendDateStart"  v-show="index==0">
             <ws-date-picker
             <ws-date-picker
               v-model="item.sendDateStart"
               v-model="item.sendDateStart"
               type="date"
               type="date"
@@ -132,7 +132,7 @@
             />
             />
           </ws-form-item>
           </ws-form-item>
           <!--到站日期-->
           <!--到站日期-->
-          <ws-form-item label="预计到站日期" span="1" prop="receiveDateEnd">
+          <ws-form-item label="预计到站日期" span="1" prop="receiveDateEnd"  v-show="index==0">
             <ws-date-picker
             <ws-date-picker
               v-model="item.receiveDateEnd"
               v-model="item.receiveDateEnd"
               type="date"
               type="date"
@@ -141,7 +141,7 @@
             />
             />
           </ws-form-item>
           </ws-form-item>
           <!--车型-->
           <!--车型-->
-          <ws-form-item label="车型" span="1" prop="carModel">
+          <ws-form-item label="车型" span="1" prop="carModel"  v-show="index==0">
             <el-select
             <el-select
               v-model="item.carModel"
               v-model="item.carModel"
               placeholder="请选择车型"
               placeholder="请选择车型"
@@ -155,7 +155,7 @@
               />
               />
             </el-select>
             </el-select>
           </ws-form-item>
           </ws-form-item>
-          <ws-form-item :label="'车厢号'" span="1" prop="boxNo">
+          <ws-form-item :label="'车厢号'" span="1" prop="boxNo"> 
             <ws-input
             <ws-input
               v-model="item.boxNo"
               v-model="item.boxNo"
               placeholder="请输入车厢号"
               placeholder="请输入车厢号"
@@ -307,7 +307,7 @@ export default {
     // handleClose() {
     // handleClose() {
     //   this.dialogViewSpareMoney = false
     //   this.dialogViewSpareMoney = false
     // },
     // },
-    add() {
+    add() {debugger
       this.deptBudgetList.tranCarInfoList.push({
       this.deptBudgetList.tranCarInfoList.push({
         driver: this.deptBudgetList.tranCarInfoList[0].driver,
         driver: this.deptBudgetList.tranCarInfoList[0].driver,
         driverPhone: this.deptBudgetList.tranCarInfoList[0].driverPhone,
         driverPhone: this.deptBudgetList.tranCarInfoList[0].driverPhone,