Browse Source

前端sdy

zhongtianhaoyuan 4 years ago
parent
commit
d0368affab
1 changed files with 59 additions and 397 deletions
  1. 59 397
      src/views/tranManagement/tranManagementVehicleDispatching.vue

+ 59 - 397
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -21,12 +21,10 @@
         >
       </el-col>
     </el-row>
-
+    <div class="center">
     <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
       <div class="basicInformation">
-        <h2>
-           任务编号
-        </h2>
+        <h2> 任务编号 </h2>
         <ws-info-table>
           <!-- 任务编号 -->
           <ws-form-item label="任务编号" span="1" prop="grossWeight">
@@ -161,24 +159,18 @@
           </ws-form-item>
           
         </ws-info-table>
-      </div>
+      
       <div class="small-title"><h2>派车</h2></div>
-      <!-- <div class="inspector">
-        <!--自检员-->
-        <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
-          <ws-input
-            v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
-            placeholder="请输入质检员姓名"
-            maxlength="120"
-            size="small"
-          />
-        </ws-form-item>
-      </div>  -->
 
-      <div class="neifor">
+     
+        <div
+          style="width: 100%"
+          class="flex position"
+          v-for="(item, index) in freightspace"
+        >
         <ws-info-table>
           <!--司机-->
-          <ws-form-item label="司机" span="1" prop="waterContent">
+          <ws-form-item :label="'司机-'+ (index+1)" span="1"  prop="waterContent" class="siji" >
             <ws-select
                 v-model="deptBudgetList.waterContent"
                 placeholder="请选择司机"
@@ -187,14 +179,14 @@
             ></ws-select>
           </ws-form-item>
           <!--司机电话-->
-          <ws-form-item label="司机电话" span="1" prop="impurity">
+          <ws-form-item label="司机电话" span="1" prop="impurity" class="siji">
             <ws-select
                 v-model="deptBudgetList.impurity"
                 placeholder="请选择司机司机电话"
             ></ws-select>
           </ws-form-item>
           <!--车牌号-->
-          <ws-form-item label="车牌号" span="1" prop="bulkDensity">
+          <ws-form-item label="车牌号" span="1" prop="bulkDensity" class="siji">
             <ws-input
               v-model="deptBudgetList.bulkDensity"
               placeholder=""
@@ -203,7 +195,7 @@
             />
           </ws-form-item>
           <!--车型-->
-          <ws-form-item label="车型" span="1" prop="mildewGrain">
+          <ws-form-item label="车型" span="1" prop="mildewGrain" class="siji">
             <ws-input
               v-model="deptBudgetList.mildewGrain"
               placeholder="请输入高栏"
@@ -212,7 +204,7 @@
             />
           </ws-form-item>
           <!--车长-->
-          <ws-form-item label="车长" span="1" prop="jiaorenli">
+          <ws-form-item label="车长" span="1" prop="jiaorenli" class="siji">
             <ws-input
               v-model="deptBudgetList.jiaorenli"
               placeholder="请输入车长"
@@ -221,7 +213,7 @@
             />
           </ws-form-item>
           <!--载重吨-->
-          <ws-form-item label="载重(吨)" span="1" prop="imperfectGrain">
+          <ws-form-item label="载重(吨)" span="1" prop="imperfectGrain" class="siji zaizhong">
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
               placeholder="请输入载重(吨)"
@@ -246,7 +238,7 @@
           class="add"
           type="primary"
           size="small"
-          @click="add1"
+          @click="add()"
           >添加司机</el-button
         >
       <div style="text-align: right; padding: 10px">
@@ -259,8 +251,11 @@
           >提交</el-button
         >
       </div>
+      </div>
     </ws-form>
+    </div>
   </div>
+  
 </template>
 <script>
 import { pullDown, addstorageputList } from '@/model/warehouse/index'
@@ -312,6 +307,7 @@ export default {
       uploadSuccess: {},
       onChange: {},
       gradeList: [],
+       freightspace: [{ binNumber: '', maxStorage: '', remark: '' }],
       rules: {
         netWeight: [
           {
@@ -357,16 +353,7 @@ export default {
     this.deptBudgetList.inOutType = '采购入库'
     this.deptBudgetList.inOutTypeKey = '1'
   },
-  activated() {
-    //   //cg.viewBudget
-    //   //cg.viewSpareMoney
-    //   // this.getVesselData();
-    //   console.log(2222)
-    //   this.getList()
-    //   console.log(1111)
-    //   this.showType = this.isShow
-    // this.getList(this.$route.query.baseId,)
-  },
+ 
   methods: {
     //返回按钮
     revert() {
@@ -377,248 +364,15 @@ export default {
             this.freightspace.splice(index,1)
         }
     },
-    //提交按钮
-    submit() {
-      if (!this.deptBudgetList.goodsName) {
-        this.$message({
-          message: '货名不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if(!this.deptBudgetList.grossWeight){
-         this.$message({
-          message: '毛重不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.grossWeight < 0 ||
-        this.deptBudgetList.grossWeight > 10000 ||
-        (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
-          String(this.deptBudgetList.grossWeight).length -
-            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
-            3)
-      ) {
-        this.$message({
-          message: '毛重输入错误',
-          type: 'warning',
-        })
-        return
-      }
-       if(!this.deptBudgetList.tare){
-         this.$message({
-          message: '皮重不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.tare < 0 ||
-        this.deptBudgetList.tare > 10000 ||
-        (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
-          String(this.deptBudgetList.tare).length -
-            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
-            3)
-      ) {
-        this.$message({
-          message: '皮重输入错误',
-          type: 'warning',
-        })
-        return
-      }
-       if(!this.deptBudgetList.agent){
-         this.$message({
-          message: '经办人不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.agent.length < 2 ||
-        this.deptBudgetList.agent.length > 10
-      ) {
-        this.$message({
-          message: '经办人输入有误',
-          type: 'warning',
-        })
-        return
-      }
-       if(!this.deptBudgetList.carNo){
-         this.$message({
-          message: '车牌号不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.deptBudgetList.carNo.length > 7) {
-        this.$message({
-          message: '车牌号输入错误,请输入7个字符之内',
-          type: 'warning',
-        })
-        return
-      }
-       if(!this.deptBudgetList.contractNo){
-         this.$message({
-          message: '合同编号不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.contractNo.length < 6 ||
-        this.deptBudgetList.contractNo.length > 20
-      ) {
-        this.$message({
-          message: '合同编号长度不符合要求,请输入6-20个字符之内',
-          type: 'warning',
-        })
-        return
-      }
-
-      
-      if(this.deptBudgetList.netWeight > this.$route.query.capacity){
-        this.$message({
-          message: '入库量大于该仓库容量!',
-          type: 'warning',
-        })
-        return
-      }
-      this.$confirm(`确定提交入库信息`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning',
+      add() {
+      this.freightspace.push({
+        binNumber: '',
+        maxStorage: '',
+        remark: '',
       })
-        .then(() => {
-          this.$refs.deptBudgetList.validate((valid) => {
-            if (valid) {
-              this.deptBudgetList.compId = sessionStorage.getItem(
-                'ws-pf_compId'
-              )
-              this.deptBudgetList.inOutFlag = 2
-              this.deptBudgetList.statusFlag = 3
-              addstorageputList(this.deptBudgetList)
-                .toPromise()
-                .then((response) => {
-                  this.$message.success('添加成功')
-                  this.$router.push({ path: 'warehouseManagementList' })
-                })
-            } else {
-              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-              return false
-            }
-          })
-        })
-        .catch(() => {
-          return false
-        })
     },
-    temporaryStorage() {
-       if (!this.deptBudgetList.goodsName) {
-        this.$message({
-          message: '货名不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if(!this.deptBudgetList.grossWeight){
-         this.$message({
-          message: '毛重不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.grossWeight < 0 ||
-        this.deptBudgetList.grossWeight > 10000 ||
-        (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
-          String(this.deptBudgetList.grossWeight).length -
-            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
-            3)
-      ) {
-        this.$message({
-          message: '毛重输入错误',
-          type: 'warning',
-        })
-        return
-      }
-       if(!this.deptBudgetList.tare){
-         this.$message({
-          message: '皮重不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.tare < 0 ||
-        this.deptBudgetList.tare > 10000 ||
-        (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
-          String(this.deptBudgetList.tare).length -
-            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
-            3)
-      ) {
-        this.$message({
-          message: '皮重输入错误',
-          type: 'warning',
-        })
-        return
-      }
-       if(!this.deptBudgetList.agent){
-         this.$message({
-          message: '经办人不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.agent.length < 2 ||
-        this.deptBudgetList.agent.length > 10
-      ) {
-        this.$message({
-          message: '经办人输入有误',
-          type: 'warning',
-        })
-        return
-      }
-       if(!this.deptBudgetList.carNo){
-         this.$message({
-          message: '车牌号不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.deptBudgetList.carNo.length > 7) {
-        this.$message({
-          message: '车牌号输入错误,请输入7个字符之内',
-          type: 'warning',
-        })
-        return
-      }
-       if(!this.deptBudgetList.contractNo){
-         this.$message({
-          message: '合同编号不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.contractNo.length < 6 ||
-        this.deptBudgetList.contractNo.length > 20
-      ) {
-        this.$message({
-          message: '合同编号长度不符合要求,请输入6-20个字符之内',
-          type: 'warning',
-        })
-        return
-      }
-       if(this.deptBudgetList.netWeight > this.$route.query.capacity){
-        this.$message({
-          message: '入库量大于该仓库容量!',
-          type: 'warning',
-        })
-        return
-      }
+    //提交按钮
+    submit() { 
       this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
@@ -648,41 +402,7 @@ export default {
           return false
         })
     },
-    tarechange(e) {
-      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
-        )
-      }
-    },
-    grossWeightchange(e) {
-      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
-        )
-      }
-    },
-    selectgoodsName(e) {
-      for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].constValue == e) {
-          this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
-        }
-      }
-    },
-    selectpackingMethod(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
-        }
-      }
-    },
-    selectstorageType(e) {
-      for (var i = 0; i < this.storageType.length; i++) {
-        if (this.storageType[i].constValue == e) {
-          this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
-        }
-      }
-    },
+   
     handleClose() {
       this.accessoryTFs = false
     },
@@ -723,26 +443,20 @@ export default {
         }
       }
     },
-    fujian(row) {
-      if (
-        row.receiveAttachmentPath === null ||
-        row.receiveAttachmentPath === ''
-      ) {
-        EventBus.$emit(
-          'warning',
-          this.$t('system.noticeCircular.NoInformation')
-        )
-      } else {
-        this.accessoryTFs = true
-      }
-      this.appendixIdss = row.receiveAttachmentPath
-    },
-    handleExamine(row) {
-      this.$router.push({
-        name: 'salesContractExamine',
-        query: { id: row.id },
-      })
-    },
+    // fujian(row) {
+    //   if (
+    //     row.receiveAttachmentPath === null ||
+    //     row.receiveAttachmentPath === ''
+    //   ) {
+    //     EventBus.$emit(
+    //       'warning',
+    //       this.$t('system.noticeCircular.NoInformation')
+    //     )
+    //   } else {
+    //     this.accessoryTFs = true
+    //   }
+    //   this.appendixIdss = row.receiveAttachmentPath
+    // },
     approve() {},
     listQuery() {},
   },
@@ -792,70 +506,20 @@ export default {
   text-align: right;
   padding: 16px 20px;
 }
-.center {
-  position: relative;
-  top: 50px;
-  width: 40%;
-  height: 2000px;
-  margin: 0 auto;
-}
-/deep/.el-form-item__label {
-  width: 160px;
-}
-//选填
-/deep/.el-form-item {
-  width: 50%;
-}
-.container {
-  overflow: scroll;
-  height: 120vh;
-}
-/deep/.ws-info-table .el-form-item .el-form-item__label {
-  text-align: center;
-}
-.deliverydate {
-  display: inline-block;
-  width: 10%;
-}
-.center {
-  margin-top: -60px;
+.center{
   width: 80%;
+  margin: 0 auto;
 }
-//仓位
 
-.position{
-background: #AFB5CB;
-border-radius: 2px;
-font-size: 12px;
-color: #FFFFFF;
-line-height: 20px;
-display: inline-grid;
-padding: 2px 4px;
-}
-// .position {
-//   width: 52px;
-//   height: 20px;
-//   background: #afb5cb;
-//   border-radius: 2px;
-//   font-size: 12px;
-//   font-family: PingFangSC-Medium, PingFang SC;
-//   color: #ffffff;
-//   line-height: 20px;
-// }
 //表格文字
 /deep/.ws-info-table .el-form-item .el-form-item__label {
   text-align: left;
   font-size: 14px;
-  font-family: PingFangSC-Regular, PingFang SC;
   font-weight: 400;
   color: #8890b1;
   line-height: 16px;
 }
-//质检员
-.inspector .el-form-item__content {
-  text-align: left;
-  margin-left: 0px;
-}
+//蓝标
 .small-title {
   position: relative;
   padding: 10px;
@@ -872,24 +536,22 @@ padding: 2px 4px;
   top: 13px;
   padding: 4px 2px;
 }
-//下面列表
-.neifor {
-  width: 80%;
-  background-color: #f6f7fc;
+.position{
+  width: 90%;
 }
-/deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
-  width: 35%;
-  text-align: center;
+.position .siji{
+  width: 15%;
 }
-/deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
-  width: 60%;
-  background-color: #f6f7fc;
+/deep/.position .ws-info-table .el-form-item .el-form-item__label{
+  width: 40%;
+  text-align: center;
 }
-
-/deep/.neifor .el-input--small .el-input__inner{
-  width: 100%;
+.position .zaizhong{
+  width: 16%;
 }
-.ws-info-table[data-v-850a44a6] .el-form-item {
-    width: 29%;
+//减号
+.del {
+  right: -70px;
 }
+
 </style>