zhangyuewww 3 年之前
父节点
当前提交
65efcae777

+ 6 - 2
src/views/tranManagement/tranManagementTransporFeedback.vue

@@ -214,7 +214,7 @@
               :disabled="readonly"
               v-model="item.sendDateStart"
               type="date"
-              style="width: 150px;"
+              class="picker"
               placeholder="请选择日期"
               value-format="yyyy-MM-dd"
             />
@@ -222,7 +222,7 @@
               v-else
               v-model="item.sendDateStart"
               type="date"
-              style="width: 150px;"
+              class="picker"
               placeholder="请选择日期"
               value-format="yyyy-MM-dd"
             />
@@ -913,6 +913,10 @@ export default {
       display: none;
     }
   }
+  /deep/ .picker{
+     padding-right: 3px !important;
+  }
+
   // .is-disabled {
   //   .el-input__inner:hover {
   //     background-color: #fff !important;

+ 3 - 27
src/views/tranManagement/tranManagementTransporTrainDetails.vue

@@ -119,23 +119,10 @@
           <ws-form-item label="车型:" span="1" prop="carModel">
             {{ item.carModel }}
           </ws-form-item>
-        </ws-info-table>
-        <ws-info-table>
-          <div
-            style="width: 100%"
-            class="flex position"
-            v-for="(items, index) in freightspace"
-            :key="index"
-          >
-            <!--车厢号-->
-            <ws-form-item
-              :label="'车厢号-' + (index + 1) + ':'"
-              span="1"
-              prop="trainNo"
-            >
-              {{ items.trainNo }}
+          <!--车厢号-->
+            <ws-form-item label="车厢号:" span="1" prop="boxNo">
+              {{ item.boxNo }}
             </ws-form-item>
-          </div>
         </ws-info-table>
       </div>
     </ws-form>
@@ -259,17 +246,6 @@ export default {
         .then((response) => {
           this.deptBudgetList = response
           this.deptBudgetList.tranCarInfoList = response.tranCarInfoList
-          if (this.deptBudgetList.tranCarInfoList.length > 0) {
-            if (response.tranCarInfoList[0].boxNo) {
-              this.list = response.tranCarInfoList[0].boxNo.split(',')
-              for (var i = 0; i < this.list.length; i++) {
-                var num = this.list[i]
-                this.freightspace.push({
-                  trainNo: num,
-                })
-              }
-            }
-          }
         })
     },
     selectChapterTwo(e) {

+ 17 - 70
src/views/tranManagement/tranManagementTransporTrainNo.vue

@@ -153,37 +153,18 @@
               />
             </el-select>
           </ws-form-item>
-        </ws-info-table>
-        <ws-info-table>
-          <div
-            style="width: 100%"
-            class="flex position carnum"
-            v-for="(item1, index) in freightspace"
-            :key="index"
-          >
-            <!--车厢号-->
-            <ws-form-item
-              :label="'车厢号-' + (index + 1)"
+          <ws-form-item
+              :label="'车厢号' "
               span="1"
               prop="boxNo"
             >
               <ws-input
-                v-model="item1.trainNo"
+                v-model="item.boxNo"
                 placeholder="请输入车厢号"
                 maxlength="20"
                 size="small"
               />
-              <span
-                width="22"
-                height="22"
-                class="del"
-                @click="del(index)"
-                src="../../../public/img/del.png"
-                alt=""
-                >×</span
-              >
             </ws-form-item>
-          </div>
         </ws-info-table>
       </div>
       <el-button class="add bg-bottom" type="primary" size="small" @click="add">
@@ -197,7 +178,7 @@
         class="bg-bottom"
         type="primary"
         size="small"
-        @click="submit(deptBudgetList)"
+        @click="submit()"
         >提交</el-button
       >
     </div>
@@ -253,7 +234,6 @@ export default {
       },
       size: 10,
       unitList: [],
-      freightspace: [],
       name: '',
       list: [],
       staffList: [],
@@ -315,8 +295,14 @@ export default {
     //   this.dialogViewSpareMoney = false
     // },
     add() {
-      this.freightspace.push({
-        trainNo: '',
+      this.deptBudgetList.tranCarInfoList.push({
+        driver:this.deptBudgetList.tranCarInfoList[0].driver,
+        driverPhone:this.deptBudgetList.tranCarInfoList[0].driverPhone,
+        sendDateStart:this.deptBudgetList.tranCarInfoList[0].sendDateStart,
+        receiveDateEnd:this.deptBudgetList.tranCarInfoList[0].receiveDateEnd,
+        carModel:this.deptBudgetList.tranCarInfoList[0].carModel,
+        boxNo: '',
+        tranType: "2"
       })
     },
     del(index) {
@@ -338,7 +324,7 @@ export default {
     uploadSuccess(data, files, url) {
       console.log(data, files, url)
     },
-    submit(deptBudgetList) {
+    submit() {
       for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
         if (!this.deptBudgetList.tranCarInfoList[i].driver) {
           this.$message({
@@ -388,10 +374,8 @@ export default {
             type: 'warning',
           })
           return
-        }
-      }
-      for (var j = 0; j < this.freightspace.length; j++) {
-        if (!this.freightspace[j].trainNo) {
+        } 
+        if (!this.deptBudgetList.tranCarInfoList[i].boxNo) {
           this.$message({
             message: '车厢号不能为空',
             type: 'warning',
@@ -399,7 +383,6 @@ export default {
           return
         }
       }
-
       this.$confirm(`提交成功后,任务将下发给相关人员,是否确定提交?`, {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -408,31 +391,10 @@ export default {
         .then(() => {
           this.$refs.deptBudgetList.validate((valid) => {
             if (valid) {
-              for (var i = 0; i < this.freightspace.length; i++) {
-                var num = this.freightspace[i].trainNo
-                this.arr.push(num)
-              }
-              this.deptBudgetList.totalStorage = this.totalStorage
-              this.tranCarInfoList.driver =
-                this.deptBudgetList.tranCarInfoList[0].driver
-              this.tranCarInfoList.driverPhone =
-                this.deptBudgetList.tranCarInfoList[0].driverPhone
-              this.tranCarInfoList.sendDateStart =
-                this.deptBudgetList.tranCarInfoList[0].sendDateStart
-              this.tranCarInfoList.receiveDateEnd =
-                this.deptBudgetList.tranCarInfoList[0].receiveDateEnd
-              this.tranCarInfoList.carModel =
-                this.deptBudgetList.tranCarInfoList[0].carModel.toString()
-              this.tranCarInfoList.id =
-                this.deptBudgetList.tranCarInfoList[0].id
-              this.tranCarInfoList.tranType = this.tranType
-              this.tranCarInfoList.boxNo = this.arr.toString()
               var tranCarInfo = {}
-              var tranList = [this.tranCarInfoList]
               tranCarInfo.id = this.deptBudgetList.id
               tranCarInfo.infoId = this.deptBudgetList.infoId
-              tranCarInfo.tranCarInfoList = tranList
-              // dispatchCat({tranCarInfo:{tranCarInfoList:[this.tranCarInfoList],id:this.deptBudgetList.id}
+              tranCarInfo.tranCarInfoList = this.deptBudgetList.tranCarInfoList
               dispatchCat(tranCarInfo)
                 .toPromise()
                 .then((response) => {
@@ -458,15 +420,6 @@ export default {
         .then((response) => {
           this.deptBudgetList = response
           if (response.tranCarInfoList.length > 0) {
-            if (response.tranCarInfoList[0].boxNo) {
-              this.list = response.tranCarInfoList[0].boxNo.split(',')
-              for (var i = 0; i < this.list.length; i++) {
-                var num = this.list[i]
-                this.freightspace.push({
-                  trainNo: num,
-                })
-              }
-            }
           } else {
             this.deptBudgetList.tranCarInfoList = [
               {
@@ -475,13 +428,7 @@ export default {
                 sendDateStart: '',
                 receiveDateEnd: '',
                 carModel: '',
-              },
-            ]
-          }
-          if (!this.deptBudgetList.tranCarInfoList[0].boxNo) {
-            this.freightspace = [
-              {
-                trainNo: '',
+                boxNo: '',
               },
             ]
           }