Browse Source

前端火运完善sdy

zhongtianhaoyuan 4 years ago
parent
commit
c102fdf566

+ 1 - 5
src/api/V2/transport/index.js

@@ -28,10 +28,6 @@ export const API_POST_TRAN_LOOK = '/tranTaskInfo/getTranTask'
 export const API_GET_AUTOMOBILE_TRAN_LIST = '/tranProcessInfo/selectTranProcessInfo'
 export const API_GET_AUTOMOBILE_TRAN_LIST = '/tranProcessInfo/selectTranProcessInfo'
 
 
 //派车
 //派车
-export const API_POST_AUTOMOBILE_DISPATCH= "/tranCarInfo/api/insertTranCar"
+export const API_POST_AUTOMOBILE_DISPATCH= '/tranProcessInfo/api/insertTranCar'
 //派车查看
 //派车查看
 export const API_GET_AUTOMOBILE_SEE = "/tranProcessInfo/getTranProcess"
 export const API_GET_AUTOMOBILE_SEE = "/tranProcessInfo/getTranProcess"
-//派车查看下拉姓名
-export const API_GET_AUTOMOBILE_NAME = "/driverViewInfo/selectDriverName"
-//派车查看联络员及车次
-export const API_GET_AUTOMOBILE_ARRANGE = "/driverViewInfo/selectDriverDetail"

+ 0 - 4
src/model/transport/index.js

@@ -56,7 +56,3 @@ export const automobileList = appRx.get(API_GET_AUTOMOBILE_TRAN_LIST, errorCatch
 export const dispatchCat = appRx.post(API_POST_AUTOMOBILE_DISPATCH, errorCatcher, errorHandle, filter)
 export const dispatchCat = appRx.post(API_POST_AUTOMOBILE_DISPATCH, errorCatcher, errorHandle, filter)
 //派车查看
 //派车查看
 export const seeCat = appRx.get(API_GET_AUTOMOBILE_SEE, errorCatcher, errorHandle, filter)
 export const seeCat = appRx.get(API_GET_AUTOMOBILE_SEE, errorCatcher, errorHandle, filter)
-//派车查看姓名下拉
-export const nameXiala = appRx.get(API_GET_AUTOMOBILE_NAME, errorCatcher, errorHandle, filter)
-//派车查看联络员及车次
-export const arrange = appRx.get(API_GET_AUTOMOBILE_ARRANGE, errorCatcher, errorHandle, filter)

+ 4 - 1
src/views/tranManagement/tranManagementTransporTationFire.vue

@@ -98,7 +98,10 @@
         </el-table-column>
         </el-table-column>
            <el-table-column prop="receive" label="收货" width="160">
            <el-table-column prop="receive" label="收货" width="160">
         </el-table-column>
         </el-table-column>
-           <el-table-column prop="tranCycle" label="运输周期" width="120">
+           <el-table-column prop="tranCycle" label="运输周期" width="160">
+              <template scope="scope">
+               {{scope.row.deliveryDateStart}} ~ {{scope.row.deliveryDateEnd}}
+             </template>
         </el-table-column>
         </el-table-column>
         <el-table-column prop="status" label="状态">
         <el-table-column prop="status" label="状态">
           <template slot-scope="scope">
           <template slot-scope="scope">

+ 96 - 194
src/views/tranManagement/tranManagementTransporTrainDetails.vue

@@ -32,205 +32,134 @@
       <ws-info-table>
       <ws-info-table>
         <!--任务编号-->
         <!--任务编号-->
         <ws-form-item label="任务编号" span="1" prop="processNo">
         <ws-form-item label="任务编号" span="1" prop="processNo">
-          <ws-input
-            v-model="deptBudgetList.processNo"
-            placeholder="请输入任务编号"
-            maxlength="20"
-            size="small"
-          />
+          {{ deptBudgetList.processNo }}
         </ws-form-item>
         </ws-form-item>
         <!--货名-->
         <!--货名-->
         <ws-form-item label="货名" span="1" prop="goodsName">
         <ws-form-item label="货名" span="1" prop="goodsName">
-          <!-- <el-select
-            v-model="deptBudgetList.goodsName"
-            placeholder="请选择货名"
-            filterable
-            :filter-method="dataFilter"
-            @change="selectstaff"
-          >
-            <el-option
-              v-for="item in personCharge"
-              :key="item.value"
-              :label="item.staffName"
-              :value="item.staffName"
-            /> -->
-             <ws-input
-            v-model="deptBudgetList.goodsName"
-            placeholder="请输入货名"
-            maxlength="20"
-            size="small"
-          />
-          <!-- </el-select> -->
+          {{ deptBudgetList.goodsName }}
         </ws-form-item>
         </ws-form-item>
         <!--重量(吨)-->
         <!--重量(吨)-->
         <ws-form-item label="重量(吨)" span="1" prop="weight">
         <ws-form-item label="重量(吨)" span="1" prop="weight">
-          <ws-input
-            v-model="deptBudgetList.weight"
-            placeholder="请输入重量(吨)"
-            maxlength="100"
-            size="small"
-          />
+          {{ deptBudgetList.weight }}
         </ws-form-item>
         </ws-form-item>
-
         <!--发货地址-->
         <!--发货地址-->
         <ws-form-item label="发货地址" span="1" prop="sendDetailedAddress">
         <ws-form-item label="发货地址" span="1" prop="sendDetailedAddress">
-           <!-- <ws-input
-            v-model="deptBudgetList.sendDetailedAddress"
-            placeholder=""
-            maxlength="100"
-            size="small"
-          /> -->
-          {{deptBudgetList.sendPrivate}}{{deptBudgetList.sendCity}}{{deptBudgetList.sendArea}}
+          {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
+          }}{{ deptBudgetList.sendArea }}
         </ws-form-item>
         </ws-form-item>
-
         <!--发货人-->
         <!--发货人-->
-        <ws-form-item label="发货人" span="1" prop="sender" class="readonly"
-        >
-          <ws-input
-            v-model="deptBudgetList.sender"
-            placeholder="请输入发货人"
-            maxlength="100"
-            size="small"
-          />
+        <ws-form-item label="发货人" span="1" prop="sender" class="readonly">
+          {{ deptBudgetList.sender }}
         </ws-form-item>
         </ws-form-item>
-
         <!--发货人电话-->
         <!--发货人电话-->
-        <ws-form-item label="发货人电话" span="1" prop="senderPhone" class="readonly"
+        <ws-form-item
+          label="发货人电话"
+          span="1"
+          prop="sender"
+          class="readonly"
         >
         >
-          <ws-input
-            v-model="deptBudgetList.senderPhone"
-            placeholder="请输入发货人电话"
-            maxlength="100"
-            size="small"
-          />
+          {{ deptBudgetList.senderPhone }}
         </ws-form-item>
         </ws-form-item>
         <!--收货地址-->
         <!--收货地址-->
         <ws-form-item label="收货地址" span="1" prop="receiveDetailedAddress">
         <ws-form-item label="收货地址" span="1" prop="receiveDetailedAddress">
-          <!-- <ws-input
-            v-model="deptBudgetList.receiveDetailedAddress"
-            placeholder="请输入仓库名"
-            maxlength="20"
-            size="small"
-          /> -->
-          {{deptBudgetList.receivePrivate}}{{deptBudgetList.receiveCity}}{{deptBudgetList.receiveArea}}
+          {{ deptBudgetList.receivePrivate }}{{ deptBudgetList.receiveCity
+          }}{{ deptBudgetList.receiveArea }}
         </ws-form-item>
         </ws-form-item>
         <!--收货人-->
         <!--收货人-->
         <ws-form-item label="收货人" span="1" prop="receiver">
         <ws-form-item label="收货人" span="1" prop="receiver">
+          {{ deptBudgetList.receiver }}
+        </ws-form-item>
+        <!--收货人电话-->
+        <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
+          {{ deptBudgetList.receiverPhone }}
+        </ws-form-item>
+        <!--发货日期-->
+        <ws-form-item label="发货日期" span="1" prop="deliveryDateStart">
+          {{ deptBudgetList.deliveryDateStart }}
+        </ws-form-item>
+        <!--最晚到货日期-->
+        <ws-form-item label="最晚到货日期" span="1" prop="deliveryDateEnd">
+          {{ deptBudgetList.deliveryDateEnd }}
+        </ws-form-item>
+        <!--合同编号-->
+        <ws-form-item label="合同编号" span="1" prop="contractNo">
+          {{ deptBudgetList.contractNo }}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="small-title">联络员及车次</div>
+      <ws-info-table>
+        <!--姓名-->
+        <ws-form-item label="姓名" span="1" prop="driver" class="liaison">
           <ws-input
           <ws-input
-            v-model="deptBudgetList.receiver"
-            placeholder="请输入仓库名"
+            v-model="deptBudgetList.driver"
+            placeholder="请输入名"
             maxlength="20"
             maxlength="20"
             size="small"
             size="small"
           />
           />
         </ws-form-item>
         </ws-form-item>
-        <!--收货人电话-->
-        <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
+        <!--电话-->
+        <ws-form-item label="电话" span="1" prop="driverPhone" class="liaison">
           <ws-input
           <ws-input
-            v-model="deptBudgetList.receiverPhone"
-            placeholder="请输入仓库名"
+            v-model="deptBudgetList.driverPhone"
+            placeholder="请输入电话"
             maxlength="20"
             maxlength="20"
             size="small"
             size="small"
           />
           />
         </ws-form-item>
         </ws-form-item>
-        <!--发货日期-->
-        <ws-form-item label="发货日期" span="1" prop="deliveryDateStart">
+        <!--发日期-->
+        <ws-form-item label="发车日期" span="1" prop="sendDateStart" class="liaison">
           <ws-input
           <ws-input
-            v-model="deptBudgetList.deliveryDateStart"
-            placeholder="请输入仓库名"
+            v-model="deptBudgetList.sendDateStart"
+            placeholder="请输入发车日期"
             maxlength="20"
             maxlength="20"
             size="small"
             size="small"
           />
           />
         </ws-form-item>
         </ws-form-item>
-        <!--最晚到货日期-->
-        <ws-form-item label="最晚到货日期" span="1" prop="deliveryDateEnd">
+        <!--到站日期-->
+        <ws-form-item label="到站日期" span="1" prop="receiveDateEnd" class="liaison">
           <ws-input
           <ws-input
-            v-model="deptBudgetList.deliveryDateEnd"
-            placeholder="请输入仓库名"
+            v-model="deptBudgetList.receiveDateEnd"
+            placeholder="请输入到站日期"
             maxlength="20"
             maxlength="20"
             size="small"
             size="small"
           />
           />
         </ws-form-item>
         </ws-form-item>
-        <!--合同编号-->
-        <ws-form-item label="合同编号" span="1" prop="contractNo">
+        <!--车型-->
+        <ws-form-item label="车型" span="1" prop="trainNo" class="liaison">
           <ws-input
           <ws-input
-            v-model="deptBudgetList.contractNo"
-            placeholder="请输入合同编号"
+            v-model="deptBudgetList.trainNo"
+            placeholder="请输入车型"
             maxlength="20"
             maxlength="20"
             size="small"
             size="small"
           />
           />
         </ws-form-item>
         </ws-form-item>
-      </ws-info-table>
-      <div class="small-title">联络员及车次</div>
-      <div
-        style="width: 100%"
-        class="flex position"
-        v-for="(item, index) in freightspace"
-      >
-        <ws-info-table>
-          <!--姓名-->
-          <ws-form-item label="姓名" span="1" prop="driver">
-            <ws-input
-              v-model="deptBudgetList.driver"
-              placeholder="请输入姓名"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <!--电话-->
-          <ws-form-item label="电话" span="1" prop="driverPhone">
-            <ws-input
-              v-model="deptBudgetList.driverPhone"
-              placeholder="请输入电话"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <!--发车日期-->
-          <ws-form-item label="发车日期" span="1" prop="sendDateStart">
-            <ws-input
-              v-model="deptBudgetList.sendDateStart"
-              placeholder="请输入发车日期"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <!--到站日期-->
-          <ws-form-item label="到站日期" span="1" prop="receiveDateEnd">
-            <ws-input
-              v-model="deptBudgetList.receiveDateEnd"
-              placeholder="请输入到站日期"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <!--车次-->
-          <ws-form-item label="车次" span="1" prop="trainNo">
+        <div
+          style="width: 100%"
+          class="flex position"
+          v-for="(item, index) in freightspace"
+        >
+          <!--车厢号-->
+          <ws-form-item label="车厢号" span="1" prop="trainNo" class="liaison">
             <ws-input
             <ws-input
               v-model="deptBudgetList.trainNo"
               v-model="deptBudgetList.trainNo"
-              placeholder="请输入车"
+              placeholder="请输入车厢号"
               maxlength="20"
               maxlength="20"
               size="small"
               size="small"
             />
             />
+            <!-- <img
+              width="22"
+              height="22"
+              class="del"
+              @click="del(index)"
+              src="../../../public/img/del.png"
+              alt=""
+            /> -->
           </ws-form-item>
           </ws-form-item>
-          <!-- 加减号 -->
-          <img
-            width="22"
-            height="22"
-            class="add"
-            @click="add"
-            src="../../../public/img/add.png"
-            alt=""
-          />
-          <img
-            width="22"
-            height="22"
-            class="del"
-            @click="del(index)"
-            src="../../../public/img/del.png"
-            alt=""
-          />
-        </ws-info-table>
-      </div>
+        </div>
+        <!-- <el-button class="add bg-bottom" type="primary" @click="add">
+          添加车厢
+        </el-button> -->
+      </ws-info-table>
     </ws-form>
     </ws-form>
 
 
     <!-- 提交 -->
     <!-- 提交 -->
@@ -302,7 +231,15 @@ export default {
       size: 10,
       size: 10,
       value1: '',
       value1: '',
       unitList: [],
       unitList: [],
-      freightspace: [{ driver: '', driverPhone: '', sendDateStart: '', receiveDateEnd: '', trainNo: '' }],
+      freightspace: [
+        {
+          driver: '',
+          driverPhone: '',
+          sendDateStart: '',
+          receiveDateEnd: '',
+          trainNo: '',
+        },
+      ],
       name: '',
       name: '',
       list: [],
       list: [],
     }
     }
@@ -319,7 +256,7 @@ export default {
       return maxStorage
       return maxStorage
     },
     },
   },
   },
-  activated(){
+  activated() {
     this.deptBudgetList.id = this.$route.query.id
     this.deptBudgetList.id = this.$route.query.id
     this.getList()
     this.getList()
   },
   },
@@ -393,50 +330,12 @@ export default {
     uploadSuccess(data, files, url) {
     uploadSuccess(data, files, url) {
       console.log(data, files, url)
       console.log(data, files, url)
     },
     },
-    // submit() {
-    //   this.$confirm(`确定提交仓库信息?`, {
-    //     confirmButtonText: '确定',
-    //     cancelButtonText: '取消',
-    //     type: 'warning',
-    //   })
-    //     .then(() => {
-    //       this.$refs.deptBudgetList.validate((valid) => {
-    //         if (valid) {
-    //           this.deptBudgetList.compId =
-    //             sessionStorage.getItem('ws-pf_compId')
-    //           this.deptBudgetList.warehousePrivate =
-    //             CodeToText[this.selectedOptions[0]]
-    //           this.deptBudgetList.warehouseCity =
-    //             CodeToText[this.selectedOptions[1]]
-    //           this.deptBudgetList.warehouseArea =
-    //             CodeToText[this.selectedOptions[2]]
-    //           this.deptBudgetList.warehousePositionInfoList = this.freightspace
-    //           this.deptBudgetList.totalStorage = this.totalStorage
-    //           addList(this.deptBudgetList)
-    //             .toPromise()
-    //             .then((response) => {
-    //               this.$message.success('添加成功')
-    //               this.deptBudgetList = {}
-    //               this.freightspace = {}
-    //               this.selectedOptions = ''
-    //               this.$router.push({ path: 'warehouseManagementList' })
-    //             })
-    //         } else {
-    //           // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-    //           return false
-    //         }
-    //       })
-    //     })
-    //     .catch(() => {
-    //       return false
-    //     })
-    // },
     resetForm(deptBudgetList) {
     resetForm(deptBudgetList) {
       this.$refs[deptBudgetList].resetFields()
       this.$refs[deptBudgetList].resetFields()
     },
     },
 
 
     getList() {
     getList() {
-      seeCat({ id : this.deptBudgetList.id })
+      seeCat({ id: this.deptBudgetList.id })
         .toPromise()
         .toPromise()
         .then((response) => {
         .then((response) => {
           this.deptBudgetList = response
           this.deptBudgetList = response
@@ -539,7 +438,7 @@ export default {
 .position {
 .position {
   position: relative;
   position: relative;
 }
 }
-.add,
+
 .del {
 .del {
   position: absolute;
   position: absolute;
   right: -38px;
   right: -38px;
@@ -547,7 +446,7 @@ export default {
   cursor: pointer;
   cursor: pointer;
 }
 }
 .del {
 .del {
-  right: -70px;
+  right: 0px;
 }
 }
 .amap-page-container {
 .amap-page-container {
   width: 300px;
   width: 300px;
@@ -828,10 +727,13 @@ export default {
   border: 0px;
   border: 0px;
 }
 }
 //联络员及车次
 //联络员及车次
-/deep/.flex .ws-info-table .el-form-item {
+/deep/.container .flex .ws-info-table .el-form-item {
   width: 20%;
   width: 20%;
 }
 }
-/deep/.flex .ws-info-table .el-form-item .el-form-item__label{
-    width: 33%;
+/deep/.container .flex .ws-info-table .el-form-item .el-form-item__label {
+  width: 33%;
+}
+/deep/.liaison{
+  width: 20%;
 }
 }
 </style>
 </style>

+ 182 - 178
src/views/tranManagement/tranManagementTransporTrainNo.vue

@@ -32,40 +32,20 @@
       <ws-info-table>
       <ws-info-table>
         <!--任务编号-->
         <!--任务编号-->
         <ws-form-item label="任务编号" span="1" prop="processNo">
         <ws-form-item label="任务编号" span="1" prop="processNo">
-          <ws-input
-            v-model="deptBudgetList.processNo"
-            placeholder="请输入任务编号"
-            maxlength="20"
-            size="small"
-          />
+          {{deptBudgetList.processNo}}
         </ws-form-item>
         </ws-form-item>
         <!--货名-->
         <!--货名-->
         <ws-form-item label="货名" span="1" prop="goodsName">
         <ws-form-item label="货名" span="1" prop="goodsName">
-          <ws-select
-            v-model="deptBudgetList.goodsName"
-            placeholder="请选择货名"
-          >
-            <ws-option
-              v-for="item in personCharge"
-              :key="item.value"
-              :label="item.staffName"
-              :value="item.staffName"
-            />
-          </ws-select>
+            {{deptBudgetList.goodsName}}
         </ws-form-item>
         </ws-form-item>
         <!--重量(吨)-->
         <!--重量(吨)-->
         <ws-form-item label="重量(吨)" span="1" prop="weight">
         <ws-form-item label="重量(吨)" span="1" prop="weight">
-          <ws-input
-            v-model="deptBudgetList.weight"
-            placeholder="请输入重量(吨)"
-            maxlength="100"
-            size="small"
-          />
+          {{deptBudgetList.weight}}
         </ws-form-item>
         </ws-form-item>
 
 
         <!--发货地址-->
         <!--发货地址-->
         <ws-form-item label="发货地址" span="1" prop="sendDetailedAddress">
         <ws-form-item label="发货地址" span="1" prop="sendDetailedAddress">
-          <el-cascader
+          <!-- <el-cascader
             :options="options_"
             :options="options_"
             v-model="deptBudgetList.sendDetailedAddress"
             v-model="deptBudgetList.sendDetailedAddress"
             clearable
             clearable
@@ -73,36 +53,22 @@
             placeholder="请选择发货地址"
             placeholder="请选择发货地址"
             style="width: 200%"
             style="width: 200%"
             @change="handleChange"
             @change="handleChange"
-          />
+          /> -->
+           {{deptBudgetList.sendPrivate}}{{deptBudgetList.sendCity}}{{deptBudgetList.sendArea}}
         </ws-form-item>
         </ws-form-item>
 
 
         <!--发货人-->
         <!--发货人-->
         <ws-form-item label="发货人" span="1" prop="sender" class="readonly">
         <ws-form-item label="发货人" span="1" prop="sender" class="readonly">
-          <ws-input
-            v-model="deptBudgetList.sender"
-            placeholder="请输入发货人"
-            maxlength="100"
-            size="small"
-          />
+          {{deptBudgetList.sender}}
         </ws-form-item>
         </ws-form-item>
 
 
         <!--发货人电话-->
         <!--发货人电话-->
-        <ws-form-item
-          label="发货人电话"
-          span="1"
-          prop="senderPhone"
-          class="readonly"
-        >
-          <ws-input
-            v-model="deptBudgetList.senderPhone"
-            placeholder="请输入发货人电话"
-            maxlength="100"
-            size="small"
-          />
+        <ws-form-item label="发货人电话" span="1"  prop="senderPhone" class="readonly">
+          {{deptBudgetList.senderPhone}}
         </ws-form-item>
         </ws-form-item>
         <!--收货地址-->
         <!--收货地址-->
         <ws-form-item label="收货地址" span="1" prop="receiveDetailedAddress">
         <ws-form-item label="收货地址" span="1" prop="receiveDetailedAddress">
-          <el-cascader
+          <!-- <el-cascader
             :options="options_"
             :options="options_"
             v-model="deptBudgetList.receiveDetailedAddress"
             v-model="deptBudgetList.receiveDetailedAddress"
             clearable
             clearable
@@ -110,138 +76,141 @@
             placeholder="请选择发货地址"
             placeholder="请选择发货地址"
             style="width: 200%"
             style="width: 200%"
             @change="handleChange"
             @change="handleChange"
-          />
+          /> -->
+           {{deptBudgetList.receivePrivate}}{{deptBudgetList.receiveCity}}{{deptBudgetList.receiveArea}}
         </ws-form-item>
         </ws-form-item>
         <!--收货人-->
         <!--收货人-->
         <ws-form-item label="收货人" span="1" prop="receiver">
         <ws-form-item label="收货人" span="1" prop="receiver">
-          <ws-input
-            v-model="deptBudgetList.receiver"
-            placeholder="请输入仓库名"
-            maxlength="20"
-            size="small"
-          />
+          {{deptBudgetList.receiver}}
         </ws-form-item>
         </ws-form-item>
         <!--收货人电话-->
         <!--收货人电话-->
         <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
         <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
-          <ws-input
-            v-model="deptBudgetList.receiverPhone"
-            placeholder="请输入仓库名"
-            maxlength="20"
-            size="small"
-          />
+          {{deptBudgetList.receiverPhone}}
         </ws-form-item>
         </ws-form-item>
         <!--发货日期-->
         <!--发货日期-->
         <ws-form-item label="发货日期" span="1" prop="deliveryDateStart">
         <ws-form-item label="发货日期" span="1" prop="deliveryDateStart">
-          <ws-date-picker
+          <!-- <ws-date-picker
             v-model="deptBudgetList.deliveryDateStart"
             v-model="deptBudgetList.deliveryDateStart"
             type="date"
             type="date"
             placeholder="请选择发货日期"
             placeholder="请选择发货日期"
             value-format="yyyy-MM-dd"
             value-format="yyyy-MM-dd"
-          />
+          /> -->
+          {{deptBudgetList.deliveryDateStart}}
         </ws-form-item>
         </ws-form-item>
         <!--最晚到货日期-->
         <!--最晚到货日期-->
         <ws-form-item label="最晚到货日期" span="1" prop="deliveryDateEnd">
         <ws-form-item label="最晚到货日期" span="1" prop="deliveryDateEnd">
-          <ws-date-picker
+          <!-- <ws-date-picker
             v-model="deptBudgetList.deliveryDateEnd"
             v-model="deptBudgetList.deliveryDateEnd"
             type="date"
             type="date"
             placeholder="请选择最晚到货日期"
             placeholder="请选择最晚到货日期"
             value-format="yyyy-MM-dd"
             value-format="yyyy-MM-dd"
-          />
+          /> -->
+          {{deptBudgetList.deliveryDateEnd}}
         </ws-form-item>
         </ws-form-item>
         <!--合同编号-->
         <!--合同编号-->
         <ws-form-item label="合同编号" span="1" prop="contractNo">
         <ws-form-item label="合同编号" span="1" prop="contractNo">
+          {{deptBudgetList.contractNo}}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="small-title">联络员及车皮信息</div>
+
+      <ws-info-table class="flex1">
+        <!--姓名-->
+        <ws-form-item label="姓名" span="1" prop="driver">
+          <el-select
+            v-model="deptBudgetList.driver"
+            placeholder="请选择姓名"
+            filterable
+            :filter-method="dataFilter"
+            @change="selectstaff"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.staffName"
+              :value="item.staffName"
+            />
+          </el-select>
+        </ws-form-item>
+        <!--电话-->
+        <ws-form-item label="电话" span="1" prop="driverPhone">
           <ws-input
           <ws-input
-            v-model="deptBudgetList.contractNo"
-            placeholder="请输入仓库名"
+            v-model="deptBudgetList.driverPhone"
+            placeholder="请输入电话"
             maxlength="20"
             maxlength="20"
             size="small"
             size="small"
           />
           />
         </ws-form-item>
         </ws-form-item>
+        <!--发车日期-->
+        <ws-form-item label="发车日期" span="1" prop="sendDateStart">
+          <ws-date-picker
+            v-model="deptBudgetList.sendDateStart"
+            type="date"
+            placeholder="请选择发货日期"
+            value-format="yyyy-MM-dd"
+          />
+        </ws-form-item>
+        <!--到站日期-->
+        <ws-form-item label="到站日期" span="1" prop="receiveDateEnd">
+          <ws-date-picker
+            v-model="deptBudgetList.receiveDateEnd"
+            type="date"
+            placeholder="请选择发货日期"
+            value-format="yyyy-MM-dd"
+          />
+        </ws-form-item>
+        <!--车型-->
+        <ws-form-item label="车型" span="1" prop="carModel">
+          <ws-select
+            v-model="deptBudgetList.carModel"
+            placeholder="请输入车型"
+            class="typeselect"
+          >
+            <ws-option
+              v-for="item in carModel"
+              :key="item.constKey"
+              :label="item.constValue"
+              :value="item.constValue"
+            />
+          </ws-select>
+        </ws-form-item>
       </ws-info-table>
       </ws-info-table>
-      <div class="small-title">联络员及车次</div>
-      <div
-        style="width: 100%"
-        class="flex position"
-        v-for="(item, index) in freightspace"
-      >
-        <ws-info-table>
-          <!--姓名-->
-          <ws-form-item label="姓名" span="1" prop="driver">
-            <!-- <ws-input
-              v-model="deptBudgetList.driver"
-              placeholder="请输入姓名"
-              maxlength="20"
-              size="small"
-            /> -->
-            <ws-select
-              v-model="deptBudgetList.driver"
-              placeholder=""
-              class="typeselect"
-              @change="selectdriver"
-            >
-              <ws-option
-                v-for="item in driverList"
-                :key="item.constKey"
-                :label="item.driverName"
-                :value="item.driverName"
-              />
-            </ws-select>
-          </ws-form-item>
-          <!--电话-->
-          <ws-form-item label="电话" span="1" prop="driverPhone">
+      <ws-info-table>
+        <div
+          style="width: 100%"
+          class="flex position"
+          v-for="(item, index) in freightspace"
+        >
+          <!--车厢号-->
+          <ws-form-item
+            :label="'车厢号-' + (index + 1)"
+            span="1"
+            prop="trainNo"
+          >
             <ws-input
             <ws-input
-              v-model="deptBudgetList.driverPhone"
-              placeholder="请输入电话"
+              v-model="item.trainNo"
+              placeholder="请输入车厢号"
               maxlength="20"
               maxlength="20"
               size="small"
               size="small"
             />
             />
-          </ws-form-item>
-          <!--发车日期-->
-          <ws-form-item label="发车日期" span="1" prop="sendDateStart">
-            <ws-date-picker
-              v-model="deptBudgetList.sendDateStart"
-              type="date"
-              placeholder="请选择发货日期"
-              value-format="yyyy-MM-dd"
-            />
-          </ws-form-item>
-          <!--到站日期-->
-          <ws-form-item label="到站日期" span="1" prop="receiveDateEnd">
-            <ws-date-picker
-              v-model="deptBudgetList.receiveDateEnd"
-              type="date"
-              placeholder="请选择发货日期"
-              value-format="yyyy-MM-dd"
+            <img
+              width="22"
+              height="22"
+              class="del"
+              @click="del(index)"
+              src="../../../public/img/del.png"
+              alt=""
             />
             />
           </ws-form-item>
           </ws-form-item>
-          <!--车次-->
-          <ws-form-item label="车次" span="1" prop="trainNo">
-            <ws-input
-              v-model="deptBudgetList.trainNo"
-              placeholder="请输入车次"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-          <!-- 加减号 -->
-          <img
-            width="22"
-            height="22"
-            class="add"
-            @click="add"
-            src="../../../public/img/add.png"
-            alt=""
-          />
-          <img
-            width="22"
-            height="22"
-            class="del"
-            @click="del(index)"
-            src="../../../public/img/del.png"
-            alt=""
-          />
-        </ws-info-table>
-      </div>
+        </div>
+        <el-button
+          class="add bg-bottom"
+          type="primary"
+          size="small"
+          @click="add"
+          >添加车厢</el-button
+        >
+      </ws-info-table>
     </ws-form>
     </ws-form>
 
 
     <!-- 提交 -->
     <!-- 提交 -->
@@ -258,7 +227,8 @@
 </template>
 </template>
 <script>
 <script>
 import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
 import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
-import { seeCat, dispatchCat, arrange, nameXiala } from '@/model/transport/index'
+import { seeCat, dispatchCat, packList } from '@/model/transport/index'
+import { getstaff } from '@/model/warehouse/index'
 import WsUpload from '@/components/WsUpload'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
 import mapDrag from '@/components/mapdrag/mapdrag'
 export default {
 export default {
@@ -294,6 +264,7 @@ export default {
       listDate: { country: '中国', level: 'country', city: '' },
       listDate: { country: '中国', level: 'country', city: '' },
       citylist: [],
       citylist: [],
       compId: sessionStorage.getItem('ws-pf_compId'),
       compId: sessionStorage.getItem('ws-pf_compId'),
+      tranType: 2,
       rules: {
       rules: {
         warehouseName: [
         warehouseName: [
           {
           {
@@ -315,15 +286,16 @@ export default {
       unitList: [],
       unitList: [],
       freightspace: [
       freightspace: [
         {
         {
-          driver: '',
-          driverPhone: '',
-          sendDateStart: '',
-          receiveDateEnd: '',
           trainNo: '',
           trainNo: '',
         },
         },
       ],
       ],
       name: '',
       name: '',
       list: [],
       list: [],
+      staffList: [],
+      options: [],
+      carModel: [],
+      tranCarInfoList: {},
+      arr:[],
     }
     }
   },
   },
   mounted() {
   mounted() {
@@ -340,6 +312,30 @@ export default {
     },
     },
   },
   },
   methods: {
   methods: {
+    dataFilter(val) {
+      this.deptBudgetList.personCharge = val
+      if (val) {
+        console.log(val)
+        this.options = this.staffList.filter((item) => {
+          if (
+            !!~item.staffName.indexOf(val) ||
+            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        this.options = this.staffList
+      }
+    },
+    selectstaff(e) {
+      for (var i = 0; i < this.staffList.length; i++) {
+        if (this.staffList[i].staffName == e) {
+          this.deptBudgetList.driverPhone = this.staffList[i].staffMobilePhone
+          this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+        }
+      }
+    },
     marker: function (item) {
     marker: function (item) {
       this.deptBudgetList.warehousePositioning =
       this.deptBudgetList.warehousePositioning =
         item.lnglat.lat + ',' + item.lnglat.lng
         item.lnglat.lat + ',' + item.lnglat.lng
@@ -358,9 +354,7 @@ export default {
     },
     },
     add() {
     add() {
       this.freightspace.push({
       this.freightspace.push({
-        binNumber: '',
-        maxStorage: '',
-        remark: '',
+        trainNo: '',
       })
       })
     },
     },
     del(index) {
     del(index) {
@@ -369,10 +363,7 @@ export default {
       }
       }
     },
     },
     //下拉司机姓名改变事件
     //下拉司机姓名改变事件
-    selectdriver(){
-
-
-    },
+    selectdriver() {},
     handleChange(value) {
     handleChange(value) {
       this.selectedOptions = value
       this.selectedOptions = value
     },
     },
@@ -404,19 +395,31 @@ export default {
       })
       })
         .then(() => {
         .then(() => {
           this.$refs.deptBudgetList.validate((valid) => {
           this.$refs.deptBudgetList.validate((valid) => {
-            console.log(this.freightspace)
             if (valid) {
             if (valid) {
-              this.deptBudgetList.compId =
-                sessionStorage.getItem('ws-pf_compId')
-              this.deptBudgetList.warehousePrivate =
-                CodeToText[this.selectedOptions[0]]
-              this.deptBudgetList.warehouseCity =
-                CodeToText[this.selectedOptions[1]]
-              this.deptBudgetList.warehouseArea =
-                CodeToText[this.selectedOptions[2]]
-              this.deptBudgetList.tranCarInfoList = this.freightspace
+              for (var i = 0; i < this.freightspace.length; i++) {
+                var num = this.freightspace[i].trainNo
+                this.arr.push(
+                  num  
+                )
+                 console.log(num )
+              }
               this.deptBudgetList.totalStorage = this.totalStorage
               this.deptBudgetList.totalStorage = this.totalStorage
-              dispatchCat(this.deptBudgetList)
+
+              this.tranCarInfoList.driver = this.deptBudgetList.driver
+              this.tranCarInfoList.driverPhone = this.deptBudgetList.driverPhone
+              this.tranCarInfoList.sendDateStart = this.deptBudgetList.sendDateStart
+              this.tranCarInfoList.receiveDateEnd = this.deptBudgetList.receiveDateEnd
+              this.tranCarInfoList.carModel = this.deptBudgetList.carModel
+              this.tranCarInfoList.tranType= this.tranType
+              // this.tranCarInfoList.infoId = this.infoId
+              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}
+              dispatchCat(tranCarInfo)
                 .toPromise()
                 .toPromise()
                 .then((response) => {
                 .then((response) => {
                   this.$message.success('添加成功')
                   this.$message.success('添加成功')
@@ -448,10 +451,17 @@ export default {
           this.deptBudgetList = response
           this.deptBudgetList = response
         })
         })
       //司机姓名下拉
       //司机姓名下拉
-      nameXiala({compId: sessionStorage.getItem('ws-pf_compId') })
+      getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
         .toPromise()
         .toPromise()
         .then((response) => {
         .then((response) => {
-          this.driverList = response
+          this.options = response
+          this.staffList = response
+        })
+      //车型
+      packList({ constId: 'TRAN5' })
+        .toPromise()
+        .then((response) => {
+          this.carModel = response
         })
         })
     },
     },
     handleExamine() {},
     handleExamine() {},
@@ -551,7 +561,7 @@ export default {
 .position {
 .position {
   position: relative;
   position: relative;
 }
 }
-.add,
+
 .del {
 .del {
   position: absolute;
   position: absolute;
   right: -38px;
   right: -38px;
@@ -559,7 +569,7 @@ export default {
   cursor: pointer;
   cursor: pointer;
 }
 }
 .del {
 .del {
-  right: -70px;
+  right: 0;
 }
 }
 .amap-page-container {
 .amap-page-container {
   width: 300px;
   width: 300px;
@@ -596,10 +606,6 @@ export default {
   position: absolute;
   position: absolute;
   left: 0;
   left: 0;
 }
 }
-.ws-info-table {
-  border-left: 1px solid transparent;
-  border-top: 1px solid transparent;
-}
 .el-button--primary {
 .el-button--primary {
   background-color: #5878e8;
   background-color: #5878e8;
   border-color: #5878e8;
   border-color: #5878e8;
@@ -791,9 +797,7 @@ export default {
 .readonly {
 .readonly {
   width: 16%;
   width: 16%;
 }
 }
-.ws-info-table .el-form-item {
-  width: 33.33%;
-}
+
 //去边框
 //去边框
 /deep/.el-form-item {
 /deep/.el-form-item {
   border-right: 0px;
   border-right: 0px;
@@ -840,10 +844,10 @@ export default {
   border: 0px;
   border: 0px;
 }
 }
 //联络员及车次
 //联络员及车次
-/deep/.flex .ws-info-table .el-form-item {
+/deep/.flex1 .ws-info-table .el-form-item {
   width: 20%;
   width: 20%;
 }
 }
-/deep/.flex .ws-info-table .el-form-item .el-form-item__label {
-  width: 33%;
+/deep/.flex1 .ws-info-table .el-form-item .el-form-item__label {
+  width: 20%;
 }
 }
 </style>
 </style>

+ 2 - 0
src/views/warehouse/warehouseManagementAdd.vue

@@ -589,6 +589,7 @@ mounted(){
           type: 'warning',
           type: 'warning',
         })
         })
           .then(() => {
           .then(() => {
+ 
             this.$refs.deptBudgetList.validate((valid) => {
             this.$refs.deptBudgetList.validate((valid) => {
               if (valid) {
               if (valid) {
                 this.deptBudgetList.compId =
                 this.deptBudgetList.compId =
@@ -602,6 +603,7 @@ mounted(){
                 this.deptBudgetList.warehousePositionInfoList =
                 this.deptBudgetList.warehousePositionInfoList =
                   this.freightspace
                   this.freightspace
                 this.deptBudgetList.totalStorage = this.totalStorage
                 this.deptBudgetList.totalStorage = this.totalStorage
+          
                 increase(this.deptBudgetList)
                 increase(this.deptBudgetList)
                   .toPromise()
                   .toPromise()
                   .then((response) => {
                   .then((response) => {