Browse Source

前端部分完善sdy

zhongtianhaoyuan 4 years ago
parent
commit
f75a394d66

+ 1 - 1
src/views/taskManagement/moveWarehouseTask.vue

@@ -54,7 +54,7 @@
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="moveTaskNo" label="移库任务编号" width="80"></el-table-column>
+        <el-table-column prop="moveTaskNo" label="移库任务编号" width="120"></el-table-column>
         <el-table-column prop="sendWarehouse" label="发货库"> </el-table-column>
         <el-table-column prop="receiveWarehouse" label="收货库"> </el-table-column>
         <el-table-column prop="goodsName" label="货名"> </el-table-column>

+ 0 - 14
src/views/tranManagement/tranManagementDriver.vue

@@ -6,23 +6,9 @@
         <ws-button type="primary" @click="handleAdd()">添加</ws-button>
       </template>
       <template slot="left">
-        <!-- <ws-select
-          v-model="searchTypeText"
-          placeholder="请选择所在城市"
-          :value="searchType"
-          @change="selecttaskType"
-        >
-        <ws-option
-            v-for="item in options_"
-            :key="item.value"
-            :label="item.label"
-            :value="item.label"
-          />
-        </ws-select> -->
         <span style="display: inline-block; width: 60px; color: #8890b1"
           >城市</span
         >
-
         <el-cascader
           :options="options_"
           v-model="searchTypeText"

+ 87 - 75
src/views/tranManagement/tranManagementTransporFeedback.vue

@@ -28,7 +28,7 @@
       :rules="rules"
       :model="deptBudgetList"
     >
-      <div class="small-title" style="font-size: 16px;">任务详情</div>
+      <div class="small-title" style="font-size: 16px">任务详情</div>
       <ws-info-table>
         <!--任务编号-->
         <ws-form-item label="任务编号" span="1" prop="processNo">
@@ -90,7 +90,7 @@
           {{ deptBudgetList.contractNo }}
         </ws-form-item>
       </ws-info-table>
-      <div class="small-title" style="font-size: 16px;">装车详情</div>
+      <div class="small-title" style="font-size: 16px">装车详情</div>
       <div class="liaison">
         <div
           style="width: 100%"
@@ -99,8 +99,15 @@
           :key="index"
         >
           <ws-info-table>
-            <div class="catNos" v-show="item.temporaryDriverFlag == 0">司机-{{index+1}}</div>
-             <div class="catNos catNosCor" v-show="item.temporaryDriverFlag != 0">司机-{{index+1}}(临)</div>
+            <div class="catNos" v-show="item.temporaryDriverFlag == 0">
+              司机-{{ index + 1 }}
+            </div>
+            <div
+              class="catNos catNosCor"
+              v-show="item.temporaryDriverFlag != 0"
+            >
+              司机-{{ index + 1 }}(临)
+            </div>
             <!--司机-->
             <ws-form-item
               label="姓名:"
@@ -177,58 +184,58 @@
             <ws-form-item label="磅单:" span="1" prop="loadPoundImg">
               <template slot-scope="scope">
                 <el-upload
-                action="https://www.zthymaoyi.com/upload/admin"
-                :show-file-list="false"
-                :on-success="
-                  (res, file) => {
-                    uploadSuccessHandle1(index, res, file)
-                  }
-                "
-                class="avatar-uploader"
-                accept=".jpg, .jpeg, .png, .gif"
-                ><img
-                  width="18"
-                  height="20"
-                  style="
-                    vertical-align: text-top;
-                    position: relative;
-                    top: -1px;
+                  action="https://www.zthymaoyi.com/upload/admin"
+                  :show-file-list="false"
+                  :on-success="
+                    (res, file) => {
+                      uploadSuccessHandle1(index, res, file)
+                    }
                   "
-                  src="../../../public/img/fujian.png"
-                  alt=""
-                />
-              </el-upload>
+                  class="avatar-uploader"
+                  accept=".jpg, .jpeg, .png, .gif"
+                  ><img
+                    width="18"
+                    height="20"
+                    style="
+                      vertical-align: text-top;
+                      position: relative;
+                      top: -1px;
+                    "
+                    src="../../../public/img/fujian.png"
+                    alt=""
+                  />
+                </el-upload>
                 <div v-show="item.temporaryDriverFlag == 0">
                   {{ item.signStatus }}
                 </div>
               </template>
             </ws-form-item>
-            
+
             <span
-            v-show="item.temporaryDriverFlag != 0"
-                width="22"
-                height="22"
-                class="del"
-                @click="del(index)"
-                src="../../../public/img/del.png"
-                alt=""
-                >×</span
-              >
+              v-show="item.temporaryDriverFlag != 0"
+              width="22"
+              height="22"
+              class="del"
+              @click="del(index)"
+              src="../../../public/img/del.png"
+              alt=""
+              >×</span
+            >
           </ws-info-table>
         </div>
       </div>
-      <div style="text-align: right;color: #8890B1;font-size: 16px;">
+      <div style="text-align: right; color: #8890b1; font-size: 16px">
         合计(吨):{{ total }}/{{ deptBudgetList.weight }}
       </div>
       <el-button class="add bg-bottom" type="primary" size="small" @click="add">
-         <img
+        <img
           width="22"
           height="22"
           @click="add"
           src="../../../public/img/add.png"
           alt=""
         />
-       <div class="spans"> 添加临时用车</div></el-button
+        <div class="spans">添加临时用车</div></el-button
       >
     </ws-form>
     <!-- 提交 -->
@@ -264,7 +271,7 @@
 </template>
 <script>
 import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
-import { seeCat, packList, feedback ,getbank} from '@/model/transport/index'
+import { seeCat, packList, feedback, getbank } from '@/model/transport/index'
 import { getstaff } from '@/model/warehouse/index'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
@@ -349,11 +356,11 @@ export default {
       appendixIdsAdd: '',
     }
   },
-  mounted() {
-    this.deptBudgetList.id = this.$route.query.id
-    this.getList()
-  },
+ activated(){
+   this.deptBudgetList.id = this.$route.query.id
+   this.getList()
 
+ },
   computed: {
     totalStorage: function () {
       var maxStorage = 0
@@ -363,13 +370,18 @@ export default {
       return maxStorage
     },
     total: function () {
-      var maxStorage = 0
-      for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
-        maxStorage += Number(
-          this.deptBudgetList.tranCarInfoList[i].loadNetWeight
-        )
+      
+      if (this.deptBudgetList.tranCarInfoList != null) {
+        var maxStorage = 0
+        for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
+          maxStorage += Number(
+            this.deptBudgetList.tranCarInfoList[i].loadNetWeight
+          )
+        }
+        return maxStorage
+      }else{
+        return 0
       }
-      return maxStorage
     },
   },
   methods: {
@@ -437,6 +449,7 @@ export default {
       this.deptBudgetList = {}
       this.freightspace = {}
       this.selectedOptions = ''
+      this.deptBudgetList.tranCarInfoList = []
       this.$router.push({ path: 'tranManagementTransporHairRespond' })
     },
     // confirmPosition() {
@@ -450,37 +463,36 @@ export default {
       this.accessoryTFs = false
     },
     submit() {
-      for(var i = 0 ; i < this.freightspace.length ; i++){
-        if(this.freightspace[i].temporaryDriverFlag != 0){
-          if(!this.freightspace[i].driver){
+      for (var i = 0; i < this.freightspace.length; i++) {
+        if (this.freightspace[i].temporaryDriverFlag != 0) {
+          if (!this.freightspace[i].driver) {
             this.$message({
-              message : '司机姓名不能为空!',
-              type: 'warning'
+              message: '司机姓名不能为空!',
+              type: 'warning',
             })
             return
           }
-          if(!this.freightspace[i].driverPhone){
+          if (!this.freightspace[i].driverPhone) {
             this.$message({
-              message:'司机电话不能为空!',
-              type: "warning"
+              message: '司机电话不能为空!',
+              type: 'warning',
             })
             return
           }
-          if(!this.freightspace[i].carNo){
+          if (!this.freightspace[i].carNo) {
             this.$message({
-              message : "车牌号不能为空!",
-              type:"warning"
+              message: '车牌号不能为空!',
+              type: 'warning',
             })
             return
           }
-          if(!this.freightspace[i].loadNetWeight){
+          if (!this.freightspace[i].loadNetWeight) {
             this.$message({
-              message:"装载净重不能为空!",
-              type: "warning"
+              message: '装载净重不能为空!',
+              type: 'warning',
             })
             return
           }
-
         }
       }
       this.$confirm(`提交成功后提醒司机及时签订运输合同,确定提交装车信息?`, {
@@ -916,11 +928,11 @@ export default {
   border-top: 0px;
 }
 .ws-info-table .el-form-item .el-form-item__content {
-border: none;
+  border: none;
 }
 /deep/.ws-info-table .el-form-item {
- border: none;
- height: 50px;
+  border: none;
+  height: 50px;
 }
 /deep/.ws-info-table .el-form-item .el-form-item__content {
   background: #f5f7fa;
@@ -957,26 +969,26 @@ border: none;
 }
 /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
   width: 30%;
-  background: #F6F7FC;
+  background: #f6f7fc;
 }
 /deep/.liaison .flex {
   display: contents;
 }
-/deep/.liaison .ws-info-table{
-  background: #F6F7FC;
-border-radius: 4px;
-border: 1px solid #D8DCE6;
-margin-top: 20px;
+/deep/.liaison .ws-info-table {
+  background: #f6f7fc;
+  border-radius: 4px;
+  border: 1px solid #d8dce6;
+  margin-top: 20px;
 }
-.catNos{
+.catNos {
   width: 100%;
   height: 30px;
   margin-top: 10px;
   margin-left: 20px;
   font-size: 14px;
 }
-.catNosCor{
-  color: #5473E8;
+.catNosCor {
+  color: #5473e8;
 }
 .add {
   width: 130px;

+ 1 - 1
src/views/tranManagement/tranManagementTransporFeedbackLook.vue

@@ -1,4 +1,4 @@
-//反馈
+//反馈查看
 <template>
   <div class="container">
     <el-row>

+ 1 - 24
src/views/tranManagement/tranManagementTransporHairRespond.vue

@@ -380,30 +380,7 @@ export default {
     find() {
       this.currentPage = 1
       this.getList()
-    },
-    async exportlist() {
-      const { data } = await export1(
-        {
-          compId: sessionStorage.getItem('ws-pf_compId'),
-          contractType: this.contractType,
-          currentPage: this.currentPage,
-          pageSize: this.pageSize,
-          searchType: this.searchType,
-          searchKeyWord: this.searchKeyWord,
-          startDate: this.startDate,
-          endDate: this.endDate,
-        },
-        {},
-        { responseType: 'blob' }
-      ).toPromise()
-      downloadFile({
-        res: data,
-        fileName: `${
-          this.date.year + (this.date.month ? `-${this.date.month}` : '')
-        }_采购合同`,
-        type: 'xls',
-      })
-    },
+    }
   },
 }
 </script>

+ 23 - 18
src/views/tranManagement/tranManagementTransporTrainDetails.vue

@@ -28,7 +28,7 @@
       :rules="rules"
       :model="deptBudgetList"
     >
-      <div class="small-title" style="font-size: 16px;">任务详情</div>
+      <div class="small-title" style="font-size: 16px">任务详情</div>
       <ws-info-table>
         <!--任务编号-->
         <ws-form-item label="任务编号" span="1" prop="processNo">
@@ -88,8 +88,12 @@
           {{ deptBudgetList.contractNo }}
         </ws-form-item>
       </ws-info-table>
-      <div class="small-title" style="font-size: 16px;">联络员及车皮信息</div>
-      <div class="liaison" v-for="(item, index) in deptBudgetList.tranCarInfoList" :key="index">
+      <div class="small-title" style="font-size: 16px">联络员及车皮信息</div>
+      <div
+        class="liaison"
+        v-for="(item, index) in deptBudgetList.tranCarInfoList"
+        :key="index"
+      >
         <ws-info-table>
           <!--姓名-->
           <ws-form-item label="姓名:" span="1" prop="driver">
@@ -109,7 +113,7 @@
           </ws-form-item>
           <!--车型-->
           <ws-form-item label="车型:" span="1" prop="carModel">
-            {{item.carModel }}
+            {{ item.carModel }}
           </ws-form-item>
         </ws-info-table>
         <ws-info-table>
@@ -121,7 +125,7 @@
           >
             <!--车厢号-->
             <ws-form-item
-              :label="'车厢号-' + (index + 1)+':'"
+              :label="'车厢号-' + (index + 1) + ':'"
               span="1"
               prop="trainNo"
             >
@@ -299,13 +303,15 @@ export default {
         .then((response) => {
           this.deptBudgetList = response
           this.deptBudgetList.tranCarInfoList = response.tranCarInfoList
-          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,
-              })
+          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,
+                })
+              }
             }
           }
         })
@@ -693,16 +699,16 @@ export default {
 }
 /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
   width: 30%;
-  background: #F5F7FA;
+  background: #f5f7fa;
   border: none;
 }
 /deep/.liaison .flex {
   display: contents;
 }
-/deep/.liaison{
-  background: #F5F7FA;
-border-radius: 4px;
-border: 0px solid #D8DCE6;
+/deep/.liaison {
+  background: #f5f7fa;
+  border-radius: 4px;
+  border: 0px solid #d8dce6;
 }
 /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
   // border: 0px solid #d8dce6;
@@ -711,5 +717,4 @@ border: 0px solid #D8DCE6;
   border-bottom: none;
   border-top: none;
 }
-
 </style>

+ 46 - 29
src/views/tranManagement/tranManagementTransporTrainNo.vue

@@ -92,7 +92,6 @@
       <div
         class="liaison"
         v-for="(item, index) in deptBudgetList.tranCarInfoList"
-        :key="index"
       >
         <ws-info-table>
           <!--姓名-->
@@ -143,7 +142,7 @@
           </ws-form-item>
           <!--车型-->
           <ws-form-item label="车型" span="1" prop="carModel">
-            <ws-select
+            <el-select
               v-model="item.carModel"
               placeholder="请输入车型"
               class="typeselect"
@@ -152,23 +151,23 @@
               allow-create
               default-first-option
             >
-              <ws-option
+              <el-option
                 v-for="items in carModel"
                 :key="items.constKey"
                 :label="items.constValue"
                 :value="items.constValue"
               />
-            </ws-select>
+            </el-select>
           </ws-form-item>
         </ws-info-table>
-         <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)"
               span="1"
@@ -191,7 +190,7 @@
               >
             </ws-form-item>
           </div>
-        </ws-info-table> 
+        </ws-info-table>
       </div>
       <el-button class="add bg-bottom" type="primary" size="small" @click="add">
         <img
@@ -275,11 +274,7 @@ export default {
       size: 10,
       value1: '',
       unitList: [],
-      freightspace: [
-        // {
-        //   trainNo: '',
-        // },
-      ],
+      freightspace: [],
       name: '',
       list: [],
       staffList: [],
@@ -289,7 +284,7 @@ export default {
       arr: [],
     }
   },
-  mounted() {
+  activated() {
     this.deptBudgetList.id = this.$route.query.id
     this.getList()
   },
@@ -361,7 +356,7 @@ export default {
     },
     returnsales() {
       this.deptBudgetList = {}
-      this.freightspace = {}
+      this.freightspace = []
       this.selectedOptions = ''
       this.$router.push({ path: 'tranManagementTransporTationFire' })
     },
@@ -372,7 +367,7 @@ export default {
     uploadSuccess(data, files, url) {
       console.log(data, files, url)
     },
-    submit() {
+    submit(deptBudgetList) {
       for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
         if (!this.deptBudgetList.tranCarInfoList[i].driver) {
           this.$message({
@@ -447,13 +442,16 @@ export default {
                 this.arr.push(num)
               }
               this.deptBudgetList.totalStorage = this.totalStorage
-              this.tranCarInfoList.driver = this.deptBudgetList.driver
-              this.tranCarInfoList.driverPhone = this.deptBudgetList.driverPhone
+              this.tranCarInfoList.driver =
+                this.deptBudgetList.tranCarInfoList[0].driver
+              this.tranCarInfoList.driverPhone =
+                this.deptBudgetList.tranCarInfoList[0].driverPhone
               this.tranCarInfoList.sendDateStart =
-                this.deptBudgetList.sendDateStart
+                this.deptBudgetList.tranCarInfoList[0].sendDateStart
               this.tranCarInfoList.receiveDateEnd =
-                this.deptBudgetList.receiveDateEnd
-              this.tranCarInfoList.carModel = this.deptBudgetList.carModel
+                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
@@ -494,14 +492,33 @@ export default {
         .toPromise()
         .then((response) => {
           this.deptBudgetList = response
-          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,
-              })
+          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 = [
+              {
+                driver: '',
+                driverPhone: '',
+                sendDateStart: '',
+                receiveDateEnd: '',
+                carModel: '',
+              },
+            ]
+          }
+          if (!this.deptBudgetList.tranCarInfoList[0].boxNo ) {
+            this.freightspace = [
+              {
+                trainNo: '',
+              },
+            ]
           }
         })
       //司机姓名下拉
@@ -926,13 +943,13 @@ export default {
   line-height: 18px;
 }
 /deep/.carnum {
-     display: contents;
+  display: contents;
 }
 /deep/.carnum .ws-info-table .el-form-item {
   width: 20%;
 }
 /deep/.liaison .carnum .ws-info-table .el-form-item {
   border-radius: 10px;
-right: 20px;
+  right: 20px;
 }
 </style>

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

@@ -363,13 +363,13 @@ export default {
           return false
         })
     },
-    selecttaskType(e) {
-      for (var i = 0; i < this.taskTypeList.length; i++) {
-        if (this.taskTypeList[i].value == e) {
-          this.searchType = this.taskTypeList[i].type
-        }
-      }
-    },
+    // selecttaskType(e) {
+    //   for (var i = 0; i < this.taskTypeList.length; i++) {
+    //     if (this.taskTypeList[i].value == e) {
+    //       this.searchType = this.taskTypeList[i].type
+    //     }
+    //   }
+    // },
     fujian(row) {
       if (
         row.receiveAttachmentPath === null ||

+ 25 - 23
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -251,23 +251,21 @@
             合计{{ total }}/{{ deptBudgetList.weight }}
           </div>
           <el-button class="add" type="primary" size="small" @click="add()">
-             <img
-                width="22"
-                height="22"
-                @click="add"
-                src="../../../public/img/add.png"
-                alt=""
-              />
-             <div class="spans">添加司机</div>
-            </el-button
-          >
+            <img
+              width="22"
+              height="22"
+              src="../../../public/img/add.png"
+              alt=""
+            />
+            <div class="spans">添加司机</div>
+          </el-button>
           <div style="text-align: right; padding: 10px">
             <el-button
               class="bg-bottom-up"
               type="primary"
               size="small"
               @click="submit()"
-            >提交</el-button
+              >提交</el-button
             >
           </div>
         </div>
@@ -352,11 +350,15 @@ export default {
   },
   computed: {
     total: function () {
-      var maxStorage = 0
-      for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
-        maxStorage += Number(this.deptBudgetList.tranCarInfoList[i].loadWeight)
+      if (this.deptBudgetList.tranCarInfoList.length > 0) {
+        var maxStorage = 0
+        for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
+          maxStorage += Number(
+            this.deptBudgetList.tranCarInfoList[i].loadWeight
+          )
+        }
+        return maxStorage
       }
-      return maxStorage
     },
   },
   methods: {
@@ -527,7 +529,7 @@ export default {
 </script>
 <style lang="scss" scoped>
 /deep/.basicInformation {
-  height:87vh;
+  height: 87vh;
   overflow: scroll;
   .ws-info-table {
     border: none;
@@ -639,8 +641,8 @@ export default {
   font-size: 14px;
 }
 /deep/.ws-info-table .el-form-item {
- border: none;
- height: 50px;
+  border: none;
+  height: 50px;
 }
 /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
   width: 40%;
@@ -671,11 +673,11 @@ export default {
   border-bottom: none;
   border-top: none;
 }
-/deep/.liaison .ws-info-table{
-  background: #F6F7FC;
-border-radius: 4px;
-border: 1px solid #D8DCE6;
-margin-top: 20px;
+/deep/.liaison .ws-info-table {
+  background: #f6f7fc;
+  border-radius: 4px;
+  border: 1px solid #d8dce6;
+  margin-top: 20px;
 }
 //送达/未送达
 .noservice,