Browse Source

前端发货反馈sdy

zhongtianhaoyuan 4 years ago
parent
commit
607c39bcdb
32 changed files with 2273 additions and 2915 deletions
  1. 10 0
      src/api/V2/taskspost/index.js
  2. 4 0
      src/api/V2/transport/index.js
  3. 4 4
      src/api/V2/warehouse/index.js
  4. 12 0
      src/model/tasksport/index.js
  5. 11 12
      src/model/transport/index.js
  6. 5 5
      src/model/warehouse/index.js
  7. 12 15
      src/store/modules/user.js
  8. 1 1
      src/views/contractManagement/purchaseContract.vue
  9. 2 3
      src/views/contractManagement/purchaseContractAdd.vue
  10. 3 3
      src/views/contractManagement/purchaseContractEdit.vue
  11. 20 21
      src/views/contractManagement/purchaseContractExamine.vue
  12. 125 590
      src/views/taskManagement/tranManagementLook.vue
  13. 56 125
      src/views/taskManagement/tranManagementTransport.vue
  14. 273 155
      src/views/taskManagement/tranManagementTransportAdd.vue
  15. 475 431
      src/views/taskManagement/tranManagementTransportEdit.vue
  16. 10 17
      src/views/tranManagement/tranManagementDriver.vue
  17. 7 2
      src/views/tranManagement/tranManagementDriverAdd.vue
  18. 136 97
      src/views/tranManagement/tranManagementTransporFeedback.vue
  19. 58 45
      src/views/tranManagement/tranManagementTransporHairRespond.vue
  20. 4 4
      src/views/tranManagement/tranManagementTransporTationFire.vue
  21. 154 135
      src/views/tranManagement/tranManagementTransporTrainDetails.vue
  22. 140 123
      src/views/tranManagement/tranManagementTransporTrainNo.vue
  23. 27 149
      src/views/tranManagement/tranManagementVehicle.vue
  24. 380 309
      src/views/tranManagement/tranManagementVehicleDispatching.vue
  25. 268 590
      src/views/tranManagement/tranManagementVehicleLook.vue
  26. 35 39
      src/views/warehouse/warehouseManagementAdd.vue
  27. 2 2
      src/views/warehouse/warehouseManagementDelete.vue
  28. 2 2
      src/views/warehouse/warehouseManagementEdit.vue
  29. 6 8
      src/views/warehouse/warehouseManagementList.vue
  30. 2 2
      src/views/warehouse/warehouseManagementLook.vue
  31. 8 5
      src/views/warehouse/warehouseManagementPerfectDelivery.vue
  32. 21 21
      src/views/warehouse/warehouseManagementPerfectput.vue

+ 10 - 0
src/api/V2/taskspost/index.js

@@ -8,3 +8,13 @@ export const API_GET_bank = '/driverViewInfo/bankShibie'
 export const API_POST_TRAN_LOOK = '/tranTaskInfo/getTranTask'
 //运输任务-添加-根据仓库类型选库名
 export const API_GET_TRAN_TASK_WAREHOUSE = '/tranTaskInfo/selectWarehouseList'
+//合同编号下拉
+export const API_GET_WAREHOUSE_NO = '/warehouseBaseInfo/selectContractNoList'
+// 运输任务添加
+export const API_POST_TRAN_ADD = '/tranTaskInfo/api/addTranTask'
+// 运输任务删除
+export const API_POST_TRAN_DEL = '/tranTaskInfo/api/deleteTranTask'
+// 运输任务-查看
+export const API_GET_TRAN_EXAMINE = '/tranTaskInfo/getTranTask'
+// 运输任务-编辑
+export const API_GET_TRAN_EDIT = '/tranTaskInfo/api/editTranTask'

+ 4 - 0
src/api/V2/transport/index.js

@@ -41,4 +41,8 @@ export const API_GET_AUTOMOBILE_SEE = "/tranProcessInfo/getTranProcess"
 export const API_GET_AUTOMOBILE_NAME = "/driverViewInfo/selectDriverName"
 //
 export const API_GET_AUTOMOBILE_ARRANGE = "/driverViewInfo/selectDriverDetail"
+//发货反馈
+export const API_POST_AUTOMOBILE_FEEDBACK = '/tranProcessInfo/api/insertTranCar'
+//更改反馈状态
+export const API_POST_AUTOMOBILE_STATE = '/tranProcessInfo/api/editFeedbackStatus'
 

+ 4 - 4
src/api/V2/warehouse/index.js

@@ -39,19 +39,19 @@ export const API_POST_WAREHOUSE_DEL_INOUTINFO = '/warehouseInOutInfo/api/deleteW
 //临时仓库增加
 export const API_POST_WAREHOUSE_ADD = '/warehouseBaseInfo/api/addTemporaryWarehouse'
 
-//临时库清仓
+//临时库清仓
 export const API_POST_WAREHOUSE_CLEARANCEE = '/warehouseBaseInfo/api/editCleared'
 
 //临时出入库合同编号下拉
 export const API_GET_WAREHOUSE_NO = '/warehouseBaseInfo/selectContractNoList'
 // 获取负责人
 export const API_GET_STAFF = '/staff/query/getStaffListByCompId'
-//临时库记录
-export const API_GET_WAREHOUSE_RECORDSS ='/warehouseInOutInfo/selectInfoTemporary'
+//临时库记录
+export const API_GET_WAREHOUSE_RECORDSS = '/warehouseInOutInfo/selectInfoTemporary'
 
 //临时出库货名下拉
 export const API_GET_GOODSNAME_XIALA = '/warehouseInOutInfo/selectTemporaryGoodsNameList'
-//临时库待完成
+//临时库待完成
 export const API_GET_WAREHOUSE_LIST = '/warehouseInOutInfo/selectWarehouseInOutInfoTemporary'
 
 

+ 12 - 0
src/model/tasksport/index.js

@@ -7,6 +7,10 @@ import {
     API_POST_PERSON,
     API_POST_TRAN_LOOK,
     API_GET_TRAN_TASK_WAREHOUSE,
+    API_GET_WAREHOUSE_NO,
+    API_POST_TRAN_DEL,
+    API_GET_TRAN_EXAMINE,
+    API_GET_TRAN_EDIT
 } from '@/api/V2/taskspost'
 //运输任务列表
 export const gain = appRx.get(API_GET_TRAN_LIST, errorCatcher, errorHandle, filter)
@@ -18,3 +22,11 @@ export const getidentity = appRx.get(API_POST_PERSON, errorCatcher, errorHandle,
 export const lookTranTask = appRx.get(API_POST_TRAN_LOOK, errorCatcher, errorHandle, filter)
 //运输任务-添加-根据仓库类型选库名
 export const getwarehousename = appRx.get(API_GET_TRAN_TASK_WAREHOUSE, errorCatcher, errorHandle, filter)
+//临时出入库合同编号下拉
+export const xialaNo = appRx.get(API_GET_WAREHOUSE_NO, errorCatcher, errorHandle, filter)
+//运输任务-删除
+export const deltran = appRx.post(API_POST_TRAN_DEL, errorCatcher, errorHandle, filter)
+//运输任务-查看
+export const examinetran = appRx.get(API_GET_TRAN_EXAMINE, errorCatcher, errorHandle, filter)
+//运输任务-编辑
+export const edittran = appRx.post(API_GET_TRAN_EDIT, errorCatcher, errorHandle, filter)

+ 11 - 12
src/model/transport/index.js

@@ -4,8 +4,6 @@ import { appRx } from '../defalutConfig/indexRx'
 import {
     API_GET_TRAN_DRIVERINFO,
     API_POST_TRAN_DRIVERINFOADD,
-    API_GET_TRAN_LIST,
-    API_POST_TRAN_ADD,
     API_GET_DRIVERINFO_GETDRIVER,
     API_POST_DELETE_DRIVER,
     API_POST_DISABLE_DRIVER,
@@ -26,16 +24,14 @@ import {
     API_GET_AUTOMOBILE_SEE,
     API_GET_AUTOMOBILE_ARRANGE,
     API_GET_AUTOMOBILE_NAME,
+    API_POST_AUTOMOBILE_FEEDBACK,
+    API_POST_AUTOMOBILE_STATE,
 
 } from '@/api/V2/transport'
 // 司机列表
 export const selectDriver = appRx.get(API_GET_TRAN_DRIVERINFO, errorCatcher, errorHandle, filter)
 // 添加司机信息
 export const addDriver = appRx.post(API_POST_TRAN_DRIVERINFOADD, errorCatcher, errorHandle, filter)
-//运输任务列表
-export const gain = appRx.get(API_GET_TRAN_LIST, errorCatcher, errorHandle, filter)
-//运输任务添加
-export const addtrantask = appRx.post(API_POST_TRAN_ADD, errorCatcher, errorHandle, filter)
 // 司机管理-查看
 export const lookDriver = appRx.get(API_GET_DRIVERINFO_GETDRIVER, errorCatcher, errorHandle, filter)
 // 司机管理-删除
@@ -60,18 +56,21 @@ export const lookTranTask = appRx.get(API_POST_TRAN_LOOK, errorCatcher, errorHan
 export const automobileList = appRx.get(API_GET_AUTOMOBILE_TRAN_LIST, errorCatcher, errorHandle, filter)
 
 //船运调度列表
-export const shippingList = appRx.get(API_GET_SHIPPING_TRAN_LIST,errorCatcher , errorHandle ,filter)
+export const shippingList = appRx.get(API_GET_SHIPPING_TRAN_LIST, errorCatcher, errorHandle, filter)
 //船运调度详情
-export const shippingLook = appRx.get(API_GET_SHIPPING_TRST_LOOK, errorCatcher, errorHandle , filter)
+export const shippingLook = appRx.get(API_GET_SHIPPING_TRST_LOOK, errorCatcher, errorHandle, filter)
 //船次安排
-export const shippingArrangemen = appRx.post(API_POST_SHIPPING_TRAN_ARR,errorCatcher, errorHandle , filter )
+export const shippingArrangemen = appRx.post(API_POST_SHIPPING_TRAN_ARR, 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 nameXiala = appRx.get(API_GET_AUTOMOBILE_NAME, errorCatcher, errorHandle, filter)
-//
+//司机其他信息
 export const arrange = appRx.get(API_GET_AUTOMOBILE_ARRANGE, errorCatcher, errorHandle, filter)
-
+//发货反馈
+export const feedback = appRx.post(API_POST_AUTOMOBILE_FEEDBACK, errorCatcher, errorHandle, filter)
+//更改反馈状态
+export const state = appRx.post(API_POST_AUTOMOBILE_STATE, errorCatcher, errorHandle, filter)

+ 5 - 5
src/model/warehouse/index.js

@@ -64,18 +64,18 @@ export const complete = appRx.get(API_GET_WAREHOUSE_COMPLETE, errorCatcher, erro
 export const delPosition = appRx.post(API_POST_WAREHOUSE_DEL_POSITION, errorCatcher, errorHandle, filter)
 //删除待完善记录
 export const delInOut = appRx.post(API_POST_WAREHOUSE_DEL_INOUTINFO, errorCatcher, errorHandle, filter)
-//临时库增加add
+//临时库增加add
 export const increase = appRx.post(API_POST_WAREHOUSE_ADD, errorCatcher, errorHandle, filter)
-//临时库清仓
+//临时库清仓
 export const clearancee = appRx.post(API_POST_WAREHOUSE_CLEARANCEE, errorCatcher, errorHandle, filter)
 //获取负责人
 export const getstaff = appRx.get(API_GET_STAFF, errorCatcher, errorHandle, filter)
-//临时库记录
-export const recordss = appRx.get(API_GET_WAREHOUSE_RECORDSS, errorCatcher , errorHandle , filter)
+//临时库记录
+export const recordss = appRx.get(API_GET_WAREHOUSE_RECORDSS, errorCatcher, errorHandle, filter)
 
 //临时出库货名下拉
 export const goodsnameXiala = appRx.get(API_GET_GOODSNAME_XIALA, errorCatcher, errorHandle, filter)
-//临时库待完成
+//临时库待完成
 export const completeList = appRx.get(API_GET_WAREHOUSE_LIST, errorCatcher, errorHandle, filter)
 //临时出入库合同编号下拉
 export const xialaNo = appRx.get(API_GET_WAREHOUSE_NO, errorCatcher, errorHandle, filter)

+ 12 - 15
src/store/modules/user.js

@@ -1,6 +1,5 @@
 import { fastLogin, logout, login, getRoule, getCurrentUserInfo, companyInfo, isLandBased, getAccountLoginHistoryCount, updateShowInfo }
   from '@/model/indexRx'
-import { getBaseInfo } from '@/model/system'
 import { getNoviceGuideData, findVesselSysVersion, getStaffHomeShowList } from '@/model/indexRx'
 import { setToken, getCompanyId, clearStorage } from '../../utils/auth'
 import { resetRouter, asyncRoutes } from '../../router'
@@ -78,7 +77,7 @@ const mutations = {
 }
 
 const actions = {
-  async login ({ commit, dispatch }, userInfo) {
+  async login({ commit, dispatch }, userInfo) {
     const { username, password, domainName, companyName } = userInfo
     const data = await login({
       username: username.trim(),
@@ -123,7 +122,7 @@ const actions = {
     setToken('Admin-Token')
     return data
   },
-  async fastLogin ({ dispatch }, userInfo) {
+  async fastLogin({ dispatch }, userInfo) {
     const { mobilePhone, veriCode } = userInfo
     const data = await fastLogin({
       mobilePhone: mobilePhone,
@@ -168,7 +167,7 @@ const actions = {
 
   },
   // get user info
-  getRoule ({ commit, state }) {
+  getRoule({ commit, state }) {
     return new Promise(async (resolve, reject) => {
       try {
         const data = await getRoule(state.roles)
@@ -182,7 +181,7 @@ const actions = {
   },
 
   // user logout
-  logout ({ commit, state }) {
+  logout({ commit, state }) {
     return new Promise((resolve, reject) => {
       logout(state.token).toPromise()
         .then(() => {
@@ -204,7 +203,7 @@ const actions = {
   },
 
   // remove token
-  resetToken ({ commit }) {
+  resetToken({ commit }) {
     return new Promise(resolve => {
       commit('SET_TOKEN', '')
       commit('SET_ROLES', [])
@@ -213,7 +212,7 @@ const actions = {
     })
   },
 
-  async getBaseInfo ({ commit }, params) {
+  async getBaseInfo({ commit }, params) {
     // debugger
     if (process.env.VUE_APP_PACKAGE_ENV === 'ship') {
       findVesselSysVersion().toPromise().then(res => {
@@ -223,24 +222,22 @@ const actions = {
         })
       })
     } else {
-      const baseInfo = await getBaseInfo().toPromise()
-      commit('SET_BASE_INFO', baseInfo)
     }
 
   },
-  setScheduleState ({ commit }, params) {
+  setScheduleState({ commit }, params) {
     commit('SET_SCHEDULE_STATE', params)
   },
-  async getTrainInfo ({ commit }, params) {
+  async getTrainInfo({ commit }, params) {
     let guideData = await getNoviceGuideData().toPromise()
     commit('SET_GUIDE_INFO', guideData.data)
   },
 
-  async getNewLogin ({ commit }, params) {
+  async getNewLogin({ commit }, params) {
     // let res = await getAccountLoginHistoryCount().toPromise()
     // commit('SET_TRAIN', res * 1 <= 0 ? 'new' : 'old')
   },
-  async getUserInfo ({ commit, dispatch }, { vesselBankFlag = 'B', compName = '' }) {
+  async getUserInfo({ commit, dispatch }, { vesselBankFlag = 'B', compName = '' }) {
     const response = await getCurrentUserInfo().toPromise()
     const {
       staffName, deptId, deptName, deptNameEn, vessels = [],
@@ -271,7 +268,7 @@ const actions = {
     sessionStorage.setItem('ws-pf_roleId', roleId || roles[0].roleId)
 
   },
-  async toSetShow ({ commit, dispatch }, { userId = '' }) {
+  async toSetShow({ commit, dispatch }, { userId = '' }) {
     const data = await getStaffHomeShowList({
       staffId: userId
     }).toPromise()
@@ -281,7 +278,7 @@ const actions = {
     })
     commit('SET_USERSETTING', showObject)
   },
-  async changeVesslBank ({ commit, dispatch, state }, showVal) {
+  async changeVesslBank({ commit, dispatch, state }, showVal) {
     await updateShowInfo(showVal).toPromise()
     dispatch('toSetShow', { userId: sessionStorage.getItem('ws-pf_userId') })
   }

+ 1 - 1
src/views/contractManagement/purchaseContract.vue

@@ -587,7 +587,7 @@ export default {
       var text = ''
       if (row.deliverType == 1) {
         text =
-          '删除该合同将同时永久删除合同对应的临时库相关数据,是否确定删除?'
+          '删除该合同将同时永久删除合同对应的临时库相关数据,是否确定删除?'
       } else {
         text = '合同删除后不可恢复,是否继续删除?'
       }

+ 2 - 3
src/views/contractManagement/purchaseContractAdd.vue

@@ -317,13 +317,13 @@
         </ws-form-item>
         <ws-form-item
           v-show="deptBudgetList.deliverType == 1"
-          label="临时库负责人"
+          label="临时库负责人"
           span="1"
           prop="packingMethod"
         >
           <el-select
             v-model="deptBudgetList.personCharge"
-            placeholder="请选择临时库负责人"
+            placeholder="请选择临时库负责人"
             filterable
             :filter-method="dataFilter"
             @change="selectstaff"
@@ -664,7 +664,6 @@ export default {
     this.deptBudgetList.contractProcessInfo.gradeKey = 1
     this.deptBudgetList.contractGoodsInfo.grade = '一等品'
     this.deptBudgetList.contractGoodsInfo.gradeKey = 1
-    console.log(1111)
     getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
       .toPromise()
       .then((response) => {

+ 3 - 3
src/views/contractManagement/purchaseContractEdit.vue

@@ -304,16 +304,16 @@
           />
         </ws-form-item>
 
-        <!-- 临时库负责人 -->
+        <!-- 临时库负责人 -->
         <ws-form-item
-          label="临时库负责人"
+          label="临时库负责人"
           span="1"
           prop="packingMethod"
           v-show="deptBudgetList.deliverType == 1"
         >
           <el-select
             v-model="deptBudgetList.personCharge"
-            placeholder="请选择临时库负责人"
+            placeholder="请选择临时库负责人"
             filterable
             :filter-method="dataFilter"
             @change="selectstaff"

+ 20 - 21
src/views/contractManagement/purchaseContractExamine.vue

@@ -52,19 +52,19 @@
         <ws-form-item label="卖方" span="1" prop="seller"
           >{{ deptBudgetList.seller }}
         </ws-form-item>
-        <ws-form-item label="交货方式" span="1" prop="deliverType1"  
+        <ws-form-item label="交货方式" span="1" prop="deliverType1"
           >{{ deptBudgetList.deliverType1 }}
         </ws-form-item>
         <ws-form-item label="买方电话" span="1" prop="buyerPhone"
           >{{ deptBudgetList.buyerPhone }}
         </ws-form-item>
-         <ws-form-item label="包装方式" span="1" prop="packingMethod">
+        <ws-form-item label="包装方式" span="1" prop="packingMethod">
           {{ deptBudgetList.packingMethod }}
         </ws-form-item>
         <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
           {{ deptBudgetList.sellerPhone }}
         </ws-form-item>
-        <ws-form-item label="验收方式" span="1" prop="acceptanceMethod" >
+        <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
           {{ deptBudgetList.acceptanceMethod }}
         </ws-form-item>
         <ws-form-item label="重量(吨)" span="1" prop="weight">
@@ -89,31 +89,30 @@
         <ws-form-item label="合同总价(元)" span="1" prop="totalContractPrice">
           {{ deptBudgetList.totalContractPrice }}
         </ws-form-item>
-        <ws-form-item label="货源所在地区" span="1" >
-          {{deptBudgetList. sourceProvince}}
-          {{deptBudgetList.sourceCity}}
-          {{deptBudgetList.sourceArea}}
-
+        <ws-form-item label="货源所在地区" span="1">
+          {{ deptBudgetList.sourceProvince }}
+          {{ deptBudgetList.sourceCity }}
+          {{ deptBudgetList.sourceArea }}
         </ws-form-item>
         <ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
-          {{deptBudgetList.sourceGoods}}
+          {{ deptBudgetList.sourceGoods }}
         </ws-form-item>
-        <ws-form-item label="交货地所在地区" span="1" >
-          {{deptBudgetList.deliveryProvince}}
-          {{deptBudgetList.deliveryCity}}
-          {{deptBudgetList. deliveryArea}}
+        <ws-form-item label="交货地所在地区" span="1">
+          {{ deptBudgetList.deliveryProvince }}
+          {{ deptBudgetList.deliveryCity }}
+          {{ deptBudgetList.deliveryArea }}
         </ws-form-item>
         <ws-form-item label="交货地详细地址" span="1" prop=" placeDelivery">
-          {{deptBudgetList.placeDelivery}}
+          {{ deptBudgetList.placeDelivery }}
         </ws-form-item>
         <ws-form-item label="签订日期" span="1" prop="signingDate">
           {{ deptBudgetList.signingDate }}
         </ws-form-item>
         <ws-form-item label="最终实际交易量(吨)" span="1" prop="TradingVolume">
-          {{deptBudgetList.sourceRegion}}
+          {{ deptBudgetList.sourceRegion }}
         </ws-form-item>
-        <ws-form-item label="临时库负责人" span="1" prop="sourceRegion">
-          {{deptBudgetList.sourceRegion}}
+        <ws-form-item label="临时库负责人" span="1" prop="sourceRegion">
+          {{ deptBudgetList.sourceRegion }}
         </ws-form-item>
       </ws-info-table>
       <!--面试信息-->
@@ -263,10 +262,10 @@ export default {
         .toPromise()
         .then((response) => {
           this.deptBudgetList = response
-          if(this.deptBudgetList.deliverType == 1){
-            this.deptBudgetList.deliverType1 = "我方自提"
-          }else if(this.deptBudgetList.deliverType == 2){
-            this.deptBudgetList.deliverType1 = "对方送货" 
+          if (this.deptBudgetList.deliverType == 1) {
+            this.deptBudgetList.deliverType1 = '我方自提'
+          } else if (this.deptBudgetList.deliverType == 2) {
+            this.deptBudgetList.deliverType1 = '对方送货'
           }
         })
       // 包装方式

+ 125 - 590
src/views/taskManagement/tranManagementLook.vue

@@ -24,201 +24,128 @@
     <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
       <div class="basicInformation">
         <ws-info-table>
-         <!--任务编号-->
-          <ws-form-item label="任务编号" span="1" prop="grossWeight">
-            <ws-input
-              @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
-              placeholder="请输入任务编号"
-              maxlength="20"
-              size="small"
-            />
+          <!--任务编号-->
+          <ws-form-item label="任务编号" span="1" prop="taskNo">
+            {{ deptBudgetList.taskNo }}
           </ws-form-item>
           <!--合同编号(选填)-->
-          <ws-form-item label="合同编号(选填)" span="1" prop="grossWeight">
-            <ws-input
-              @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
-              placeholder="请输入合同编号"
-              maxlength="20"
-              size="small"
-            />
+          <ws-form-item label="合同编号(选填)" span="1" prop="contractNo">
+            {{ deptBudgetList.contractNo }}
           </ws-form-item>
           <!--货名-->
-          <ws-form-item
-            label="货名"
-            span="1"
-            prop="tare"
-            class="readonly"
-          >
-            <ws-input
-              @input="tarechange"
-              v-model="deptBudgetList.tare"
-              placeholder="请输入货名"
-              maxlength="100"
-              size="small"
-            />
+          <ws-form-item label="货名" span="1" prop="goodsName" class="readonly">
+            {{ deptBudgetList.goodsName }}
           </ws-form-item>
           <!-- 重量(吨) -->
-          <ws-form-item label="重量(吨)" span="1" prop="grossWeight">
-            <ws-input
-              @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
-              placeholder="请输入重量(吨)"
-              maxlength="20"
-              size="small"
-            />
-            
+          <ws-form-item label="重量(吨)" span="1" prop="weight">
+            {{ deptBudgetList.weight }}
           </ws-form-item>
-
         </ws-info-table>
         <div class="inspector">
-            <!-- 始发地 -->
-              <ws-form-item label="始发地" span="1" prop="netWeight">
-            <ws-input
-              readonly="readonly"
-              v-model="deptBudgetList.netWeight"
-              placeholder="请输入始发地"
-              maxlength="120"
-              size="small"
-            />
+          <!-- 始发地 -->
+          <ws-form-item
+            class="address"
+            label="始发地"
+            span="1"
+            prop="netWeight"
+          >
+            {{ deptBudgetList.startPrivate }}/{{ deptBudgetList.startCity
+            }}{{ deptBudgetList.startArea
+            }}{{ deptBudgetList.startDetailedAddress }}
           </ws-form-item>
           <!--终到地-->
-          <ws-form-item label="终到地" span="1" prop="netWeight">
-            <ws-input
-              readonly="readonly"
-              v-model="deptBudgetList.netWeight"
-              placeholder="请输入始发地"
-              maxlength="120"
-              size="small"
-            />
-            </ws-form-item>
-            <span class="zi">运输方式</span>
-           <el-checkbox-group v-model="checkList"> 
-          <el-checkbox label="汽运"></el-checkbox>
-          <el-checkbox label="火运"></el-checkbox>
-          <el-checkbox label="船运"></el-checkbox>
-        </el-checkbox-group>
-          </div>
-      </div>
-      <div class="driver">运输阶段-{{index + 1}}</div>
-     <div class="neifor">
-        <ws-info-table class="el-table">
-          <!--运输方式-->
-          <ws-form-item label="运输方式" span="1" prop="waterContent">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.waterContent"
-              placeholder="请输入运输方式"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-          <!--发货日期-->
-          <ws-form-item label="发货日期" span="1" prop="impurity">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.impurity"
-              placeholder="请输入发货日期"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-          <!--最晚到货日期-->
-          <ws-form-item label="最晚到货日期" span="1" prop="bulkDensity">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
-              placeholder="请输入最晚到货日期"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-        </ws-info-table>
-      <!-- </div>
-      <div class="nei"> -->
-         <ws-info-table>
-          <!--发货日期-->
-          <ws-form-item label="发货地区" span="1" prop="waterContent">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.waterContent"
-              placeholder="请输入发货地区"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-          <!--发货地详细地址-->
-          <ws-form-item label="发货地详细地址" span="1" prop="impurity">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.impurity"
-              placeholder="请输入发货地详细地址"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-          <!--发货人-->
-          <ws-form-item label="发货人" span="1" prop="bulkDensity">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
-              placeholder="请输入发货人"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-          <!--发货人电话-->
-          <ws-form-item label="发货人电话" span="1" prop="bulkDensity">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
-              placeholder="请输入发货人电话"
-              maxlength="120"
-              size="small"
-            />
+          <ws-form-item
+            class="address"
+            label="终到地"
+            span="1"
+            prop="netWeight"
+          >
+            {{ deptBudgetList.endPrivate }}/{{ deptBudgetList.endCity
+            }}{{ deptBudgetList.endArea
+            }}{{ deptBudgetList.endDetailedAddress }}
           </ws-form-item>
-        </ws-info-table>
+          <span class="zi">运输方式</span>
+          <el-checkbox-group v-model="checkList">
+            <el-checkbox disabled label="汽运"></el-checkbox>
+            <el-checkbox disabled label="火运"></el-checkbox>
+            <el-checkbox disabled label="船运"></el-checkbox>
+          </el-checkbox-group>
+        </div>
       </div>
-      <div class="nei">
-         <ws-info-table>
-          <!--发货日期-->
-          <ws-form-item label="收货地区" span="1" prop="waterContent">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.waterContent"
-              placeholder="请输入收货地区"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-          <!--发货地详细地址-->
-          <ws-form-item label="收货地详细地址" span="1" prop="impurity">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.impurity"
-              placeholder="请输入收货地详细地址"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-          <!--发货人-->
-          <ws-form-item label="收货人" span="1" prop="bulkDensity">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
-              placeholder="请输入收货人"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-          <!--发货人电话-->
-          <ws-form-item label="收货人电话" span="1" prop="bulkDensity">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
-              placeholder="请输入收货人电话"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-        </ws-info-table>
+      <div v-for="(item, index) in deptBudgetList.tranProcessInfoList">
+        <div class="driver">运输阶段-{{ item.processNo }}{{ index + 1 }}</div>
+        <div class="neifor">
+          <ws-info-table class="el-table">
+            <!--运输方式-->
+            <ws-form-item label="运输方式" span="1" prop="tranType">
+              {{ item.tranType }}
+            </ws-form-item>
+            <!--发货日期-->
+            <ws-form-item label="发货日期" span="1" prop="deliveryDateStart">
+              {{ item.deliveryDateStart }}
+            </ws-form-item>
+            <!--最晚到货日期-->
+            <ws-form-item label="最晚到货日期" span="1" prop="deliveryDateEnd">
+              {{ item.deliveryDateEnd }}
+            </ws-form-item>
+          </ws-info-table>
+          <!-- </div>
+      <div class="nei"> -->
+          <ws-info-table>
+            <!--发货日期-->
+            <ws-form-item label="发货地区" span="1" prop="waterContent">
+              {{ item.sendPrivate }}/{{ item.sendCity }}{{ item.sendArea }}
+            </ws-form-item>
+            <!--发货地详细地址-->
+            <ws-form-item
+              label="发货地详细地址"
+              span="1"
+              prop="sendDetailedAddress"
+            >
+              {{ item.sendDetailedAddress }}
+            </ws-form-item>
+            <!--发货人-->
+            <ws-form-item label="发货人" span="1" prop="sender">
+              {{ item.sender }}
+            </ws-form-item>
+            <!--发货人电话-->
+            <ws-form-item label="发货人电话" span="1" prop="senderPhone">
+              {{ item.senderPhone }}
+            </ws-form-item>
+          </ws-info-table>
+        </div>
+        <div class="nei">
+          <ws-info-table>
+            <!--发货日期-->
+            <ws-form-item label="收货地区" span="1" prop="waterContent">
+              {{ item.receivePrivate }}/{{ item.receiveCity
+              }}{{ item.receiveArea }}
+            </ws-form-item>
+            <!--发货地详细地址-->
+            <ws-form-item
+              label="收货地详细地址"
+              span="1"
+              prop="receiveDetailedAddress"
+            >
+              {{ item.receiveDetailedAddress }}
+            </ws-form-item>
+            <!--发货人-->
+            <ws-form-item label="收货人" span="1" prop="receiver">
+              {{ item.receiver }}
+            </ws-form-item>
+            <!--发货人电话-->
+            <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
+              {{ item.receiverPhone }}
+            </ws-form-item>
+          </ws-info-table>
+        </div>
       </div>
       <div style="text-align: right; padding: 10px">
         <el-button
           class="bg-bottom-up"
           type="primary"
           size="small"
-          @click="submit()"
+          @click="revert()"
           >关闭</el-button
         >
       </div>
@@ -226,7 +153,7 @@
   </div>
 </template>
 <script>
-import { lookTranTask ,gain } from '@/model/transport/index'
+import { examinetran } from '@/model/tasksport/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
@@ -248,7 +175,7 @@ export default {
   data() {
     return {
       //多选按钮
-      checkList:[],
+      checkList: [],
       //弹出框
       dialogViewSpareMoney: false,
       dialogApproveFormVisible: false,
@@ -296,9 +223,7 @@ export default {
         month: dayjs().format('MM'),
       },
       contractList: [],
-      deptBudgetList: {
-        warehouseInOutDetail: {},
-      },
+      deptBudgetList: {},
       historyList: [],
 
       pickerBeginDateBefore: {
@@ -309,415 +234,22 @@ export default {
       accessoryTFs: false,
     }
   },
-  mounted() {
-    this.deptBudgetList.baseId = this.$route.query.baseId
-    this.deptBudgetList.positionId = this.$route.query.positionId
-    this.deptBudgetList.warehouseName = this.$route.query.warehouseName
-    this.deptBudgetList.binNumber = this.$route.query.binNumber
-    this.getList()
-    // this.deptBudgetList.goodsName = '玉米'
-    // this.deptBudgetList.goodsNameKey = '1'
-    // this.deptBudgetList.grade = '一等品'
-    // this.deptBudgetList.gradeKey = '1'
-    // 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,)
+    this.getList()
   },
   methods: {
-
     //返回按钮
     revert() {
       this.$router.push({ path: 'tranManagementTransport' })
     },
-    //提交按钮
-    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',
-      })
-        .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
-      }
-      this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning',
-      })
-        .then(() => {
-          this.$refs.deptBudgetList.validate((valid) => {
-            if (valid) {
-              this.deptBudgetList.compId = sessionStorage.getItem(
-                'ws-pf_compId'
-              )
-              this.deptBudgetList.inOutFlag = 2
-              this.deptBudgetList.statusFlag = 1
-              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
-        })
-    },
-    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
-    },
-    handleSizeChange(val) {
-      console.log(`每页 ${val} 条`)
-      this.pageSize = val
-      this.getList()
-    },
-    handleCurrentChange(val) {
-      this.currentPage = val
-      console.log(`当前页: ${val}`)
-      this.getList()
-    },
     getList() {
-      // 货名
-      pullDown({ constId: 'CON2' })
-        .toPromise()
-        .then((response) => {
-          this.goodnameList = response
-        })
-      // 品级
-      pullDown({ constId: 'CON3' })
-        .toPromise()
-        .then((response) => {
-          this.gradeList = response
-        })
-      // 类型
-      pullDown({ constId: 'CON5' })
+      examinetran({ id: this.$route.query.id })
         .toPromise()
         .then((response) => {
-          this.storageType = response
+          this.checkList = response.tranType.split(',')
+          this.deptBudgetList = response
         })
     },
-    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 ||
-        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 },
-      })
-    },
-
-    // 关闭 dialog时 处理文件url 初始化upload组件
-    // handleCloe() {
-    //   this.dialogViewSpareMoney = false
-    // },
-    // history(row) {
-    //   billoperatehis({ id: row.id })
-    //     .toPromise()
-    //     .then((response) => {
-    //       this.historyList = response
-    //     })
-    // },
-    // deletecontract(){},
-    //删除
     approve() {},
     listQuery() {},
   },
@@ -774,6 +306,9 @@ export default {
   height: 2000px;
   margin: 0 auto;
 }
+/deep/.address.el-form-item {
+  width: 100%;
+}
 /deep/.el-form-item__label {
   width: 160px;
 }
@@ -798,14 +333,14 @@ export default {
 }
 //仓位
 
-.position{
-background: #AFB5CB;
-border-radius: 2px;
-font-size: 12px;
-color: #FFFFFF;
-line-height: 20px;
-display: inline-grid;
-padding: 2px 4px;
+.position {
+  background: #afb5cb;
+  border-radius: 2px;
+  font-size: 12px;
+  color: #ffffff;
+  line-height: 20px;
+  display: inline-grid;
+  padding: 2px 4px;
 }
 // .position {
 //   width: 52px;
@@ -865,22 +400,22 @@ padding: 2px 4px;
 // /deep/.neifor .el-input--small .el-input__inner{
 //   width: 100%;
 // }
-.inspector  {
+.inspector {
   text-align: left;
   margin-left: -350px;
   // margin-top: 50px;
   width: 700px;
   margin-left: -100px;
 }
-.ws-info-table .el-form-item{
+.ws-info-table .el-form-item {
   width: 300px;
 }
 //多选
-.el-checkbox-group{
+.el-checkbox-group {
   margin-left: 160px;
   margin-top: -20px;
 }
-.zi{
+.zi {
   margin-left: 100px;
 }
 //底部表格

+ 56 - 125
src/views/taskManagement/tranManagementTransport.vue

@@ -8,11 +8,11 @@
         >
       </template>
       <template slot="left">
-        <ws-button class="but" type="primary" @click="handle()">
+        <ws-button class="but" type="primary" @click="handlestatus(1)">
           执行中</ws-button
         >
-        <ws-button class="but" @click="handleLook()">已完成</ws-button>
-        <ws-button class="but" @click="handleEdit()">全部任务</ws-button>
+        <ws-button class="but" @click="handlestatus(2)">已完成</ws-button>
+        <ws-button class="but" @click="handlestatus('')">全部任务</ws-button>
       </template>
       <template slot="left">
         <ws-input
@@ -61,76 +61,43 @@
     <div>
       <el-table
         class="wenzi"
-        :data="gainList"
+        :data="gainList.records"
         style="width: 100%; margin-top: 20px"
         height="780"
       >
-        <el-table-column prop="index" label="序号" width="80">
+        <el-table-column type="index" label="序号">
+          <template scope="scope">
+            <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+            <span v-else>{{ scope.$index + 1 }}</span>
+          </template>
         </el-table-column>
-        <el-table-column prop=" taskNo" label="运输任务编号" width="80">
+        <el-table-column prop="taskNo" label="运输任务编号" width="80">
         </el-table-column>
-        <el-table-column prop=" contractNo" label="合同编号">
+        <el-table-column prop="contractNo" label="合同编号"> </el-table-column>
+        <el-table-column prop=" weight" class="table_td" label="货物(吨数)">
           <template slot-scope="scope">
-            <div
-              v-if="scope.row.capacity != 'null' && scope.row.capacity != null"
-            >
-              {{ scope.row.capacity }}
-            </div>
+            {{ scope.row.goodsName }}({{ scope.row.weight }})
           </template>
         </el-table-column>
-        <el-table-column prop=" weight" class="table_td" label="货物(吨数)">
-          <!-- <template slot-scope="scope">
-            <div
-              style="height: 24px"
-              v-for="(item, i) in scope.row.warehouseNumViewList"
-            >
-              {{ item.inNetWeight }}
-            </div>
-          </template> -->
-        </el-table-column>
-        <el-table-column class="table_td" label="运输方式">
-          <!-- <template slot-scope="scope">
-            <div
-              style="height: 24px"
-              v-for="(item, i) in scope.row.warehouseNumViewList"
-            >
-              {{ item.outNetWeight }}
-            </div>
-          </template> -->
+        <el-table-column prop="tranType" class="table_td" label="运输方式">
         </el-table-column>
-        <el-table-column prop=" start" class="table_td" label="起点">
-          <!-- <template slot-scope="scope">
-            <div
-              style="height: 24px"
-              v-for="(item, i) in scope.row.warehouseNumViewList"
-            >
-              {{ item.storage }}
-            </div>
-          </template> -->
+        <el-table-column prop="" class="table_td" label="起点">
+          <template slot-scope="scope">
+            {{ scope.row.startPrivate }}{{ scope.row.startCity
+            }}{{ scope.row.startArea }}{{ scope.row.startDetailedAddress }}
+          </template>
         </el-table-column>
         <el-table-column
           prop="currentTransferAddress"
           class="table_td"
           label="当前中转"
         >
-          <!-- <template slot-scope="scope">
-            <div
-              style="height: 24px"
-              v-for="(item, i) in scope.row.warehouseNumViewList"
-            >
-              {{ item.storage }}
-            </div>
-          </template> -->
         </el-table-column>
         <el-table-column prop="end" class="table_td" label="终点">
-          <!-- <template slot-scope="scope"> -->
-          <!-- <div
-              style="height: 24px"
-              v-for="(item, i) in scope.row.warehouseNumViewList"
-            >
-              {{ item.storage }}
-            </div> -->
-          <!-- </template> -->
+          <template slot-scope="scope">
+            {{ scope.row.endPrivate }}{{ scope.row.endCity
+            }}{{ scope.row.endArea }}{{ scope.row.endDetailedAddress }}
+          </template>
         </el-table-column>
 
         <el-table-column prop="status" label="状态">
@@ -187,47 +154,21 @@
         </el-table-column>
         <el-table-column prop="seller" label="操作" width="300">
           <template slot-scope="scope">
-            <ws-button
-              class="completed"
-              @click="nocomplete(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
-            >
+            <ws-button class="completed" @click="nocomplete(scope.row)">
               查看
             </ws-button>
-            <ws-button
-              class="putstorage"
-              @click="warehousing(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
-            >
+            <ws-button class="putstorage" @click="delivery(scope.row)">
               编辑
             </ws-button>
-            <ws-button
-              class="deliverystorage"
-              @click="delivery(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
-            >
-              删除
-            </ws-button>
+            <ws-button @click="deleteclick(scope.row)"> 删除 </ws-button>
           </template>
         </el-table-column>
-        <!-- <el-table-column prop="address" label="操作" width="200">
-          <template slot-scope="scope">
-            <div class="record" @click="record(scope.row)">记录</div>
-            <div class="adjustment" @click="loss(scope.row)">盘损</div>
-          </template>
-        </el-table-column> -->
       </el-table>
     </div>
   </div>
 </template>
 <script>
-import { gain } from '@/model/transport/index'
+import { gain, deltran } from '@/model/tasksport/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -297,6 +238,27 @@ export default {
       this.currentPage = 1
       this.getList()
     },
+    deleteclick(row) {
+      //cancelButtonClass: "btn-custom-cancel"
+      this.$confirm(`运输任务删除后不可恢复,是否确定删除?`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          console.log(row)
+          deltran({
+            id: row.id,
+          })
+            .toPromise()
+            .then((response) => {
+              this.getList()
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
     getList() {
       gain({
         compId: sessionStorage.getItem('ws-pf_compId'),
@@ -310,16 +272,16 @@ export default {
           this.gainList = response
         })
     },
+    handlestatus(status) {
+      this.searchType = status
+      this.getList()
+    },
     //编辑
     delivery(item) {
       this.$router.push({
         path: 'tranManagementTransportEdit',
         query: {
-          baseId: item.warehouseId,
-          positionId: item.binNumberId,
-          warehouseName: item.warehouseName,
-          binNumber: item.binNumber,
-          capacity: item.capacity,
+          id: item.id,
         },
       })
     },
@@ -375,42 +337,11 @@ export default {
     nocomplete(row) {
       this.$router.push({
         path: 'tranManagementLook',
-        // query: {
-        //   baseId: row.warehouseId,
-        //   positionId: row.binNumberId,
-        //   warehouseName: row.warehouseName,
-        //   binNumber: row.binNumber,
-        // },
+        query: {
+          id: row.id,
+        },
       })
     },
-    //记录
-    // record(item) {
-    //   this.$router.push({
-    //     name: 'warehouseManagementRecord',
-    //     query: {
-    //       baseId: item.warehouseId,
-    //       positionId: item.binNumberId,
-    //       warehouseName: item.warehouseName,
-    //     },
-    //     params: {
-    //       remark: item.remark,
-    //       binNumber: item.binNumber,
-    //       capacity: item.capacity,
-    //     },
-    //   })
-    // },
-    //盘损
-    // loss(item) {
-    //   this.$router.push({
-    //     path: 'warehouseManagementIoss',
-    //     query: {
-    //       baseId: item.warehouseId,
-    //       positionId: item.binNumberId,
-    //       warehouseName: item.warehouseName,
-    //       binNumber: item.binNumber,
-    //     },
-    //   })
-    // },
     //查看
     handleLook() {
       this.$router.push({ path: 'tranManagementLook' })

+ 273 - 155
src/views/taskManagement/tranManagementTransportAdd.vue

@@ -55,13 +55,12 @@
             v-model="deptBudgetList.contractNo"
             placeholder="请输入合同编号"
             class="typeselect"
-            @change="selectcontractNo"
           >
             <el-option
               v-for="item in contractNoList"
               :key="item.constKey"
-              :label="item.constValue"
-              :value="item.constValue"
+              :label="item.contractNo"
+              :value="item.contractNo"
             ></el-option>
           </el-select>
         </el-form-item>
@@ -82,7 +81,6 @@
         </el-form-item>
         <el-form-item label="重量(吨)" span="1" prop="weight">
           <el-input
-            @input="grossWeightchange"
             v-model="deptBudgetList.weight"
             placeholder="请输入重量"
             maxlength="20"
@@ -93,22 +91,21 @@
       <ws-info-table class="el-table">
         <div class="start-address">
           <el-radio v-model="deptBudgetList.warehouseType" label="1"
-            >自有库发货</el-radio
+            >常用仓库发货</el-radio
           >
           <el-radio v-model="deptBudgetList.warehouseType" label="2"
-            >临时库发货</el-radio
+            >临时库发货</el-radio
           >
           <el-select
-            v-model="deptBudgetList.contractNo"
-            placeholder="货名"
+            v-model="deptBudgetList.sendWarehouse"
+            placeholder="选择仓库"
             class="typeselect"
-            @change="selectstorageType"
           >
             <el-option
-              v-for="item in storageType"
+              v-for="item in warehouseList"
               :key="item.constKey"
-              :label="item.constValue"
-              :value="item.constValue"
+              :label="item.warehouseName"
+              :value="item.warehouseName"
             ></el-option>
           </el-select>
         </div>
@@ -130,7 +127,7 @@
           class="bg-right start-address"
         >
           <el-input
-            v-model="deptBudgetList.driverName"
+            v-model="deptBudgetList.startDetailedAddress"
             placeholder="请输入始发地详细地址"
             maxlength="20"
             size="small"
@@ -143,16 +140,16 @@
           class="start-address"
         >
           <el-select
-            v-model="deptBudgetList.contractNo"
-            placeholder="货名"
+            v-model="deptBudgetList.receiveWarehouse"
+            :disabled="warehouse"
+            placeholder="收货苦点"
             class="typeselect"
-            @change="selectstorageType"
           >
             <el-option
-              v-for="item in storageType"
+              v-for="item in warehouseList"
               :key="item.constKey"
-              :label="item.constValue"
-              :value="item.constValue"
+              :label="item.warehouseName"
+              :value="item.warehouseName"
             ></el-option>
           </el-select>
         </el-form-item>
@@ -173,14 +170,14 @@
           />
         </el-form-item>
         <el-form-item
-          label="始发地详细地址"
+          label="终到地详细地址"
           span="1"
-          prop="startDetailedAddress"
+          prop="endDetailedAddress"
           class="bg-right start-address"
         >
           <el-input
-            v-model="deptBudgetList.driverName"
-            placeholder="请输入始发地详细地址"
+            v-model="deptBudgetList.endDetailedAddress"
+            placeholder="请输入终到地详细地址"
             maxlength="20"
             size="small"
           ></el-input>
@@ -198,11 +195,10 @@
       <div
         style="width: 100%"
         class="position"
-        v-for="(item, index) in freightspace"
+        v-for="(item, index) in deptBudgetList.tranProcessInfoList"
       >
         <div class="driver">
-          运输阶段-{{ index + 1 }}
-          {{ deptBudgetList.taskNo }}
+          运输阶段{{ index + 1 }} {{ item.processNo }}
           <img
             width="22"
             height="22"
@@ -223,13 +219,17 @@
         <ws-info-table>
           <el-form-item label="运输方式" span="1" prop="waterContent">
             <el-select
-              v-model="deptBudgetList.contractNo"
-              placeholder="货名"
+              v-model="item.tranType"
+              placeholder="运输方式"
               class="typeselect"
-              @change="selectstorageType"
+              @change="
+                (val) => {
+                  selecttaskwayList(val, index)
+                }
+              "
             >
               <el-option
-                v-for="item in storageType"
+                v-for="item in taskwayList"
                 :key="item.constKey"
                 :label="item.constValue"
                 :value="item.constValue"
@@ -237,58 +237,69 @@
             </el-select>
           </el-form-item>
           <el-form-item label="发货日期" span="1" prop="impurity">
-            <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入始发地详细地址"
-              maxlength="20"
-              size="small"
-            ></el-input>
+            <ws-date-picker
+              v-model="item.deliveryDateStart"
+              type="date"
+              placeholder="请选择发货日期"
+              value-format="yyyy-MM-dd"
+            />
           </el-form-item>
           <el-form-item label="最晚到货日期" span="1" prop="bulkDensity">
+            <ws-date-picker
+              v-model="item.deliveryDateEnd"
+              type="date"
+              placeholder="请选择最晚到货日期"
+              value-format="yyyy-MM-dd"
+            />
+          </el-form-item>
+          <el-form-item
+            label="本阶段运输重量(吨)"
+            span="1"
+            prop="bulkDensity"
+          >
             <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入始发地详细地址"
-              maxlength="20"
+              v-model="item.weight"
+              placeholder="请输入本阶段运输重量"
               size="small"
             ></el-input>
           </el-form-item>
         </ws-info-table>
         <ws-info-table>
           <el-form-item label="发货地区" span="1" prop="waterContent">
-            <el-select
-              v-model="deptBudgetList.contractNo"
-              placeholder="货名"
-              class="typeselect"
-              @change="selectstorageType"
-            >
-              <el-option
-                v-for="item in storageType"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              ></el-option>
-            </el-select>
+            <el-cascader
+              :options="options_"
+              v-model="item.selectedOptions"
+              clearable
+              size="large"
+              placeholder="请选择发货地区"
+              style="width: 200%"
+              @change="
+                (val) => {
+                  handleChange3(val, index)
+                }
+              "
+            />
           </el-form-item>
           <el-form-item label="发货地详细地址" span="1" prop="impurity">
             <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入发地详细地址"
+              v-model="item.sendDetailedAddress"
+              placeholder="请输入发地详细地址"
               maxlength="20"
               size="small"
             ></el-input>
           </el-form-item>
           <el-form-item label="发货人" span="1" prop="bulkDensity">
             <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入始发地详细地址"
+              v-model="item.sender"
+              placeholder="请输入发货人"
               maxlength="20"
               size="small"
             ></el-input>
           </el-form-item>
           <el-form-item label="发货人电话" span="1" prop="bulkDensity">
             <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入始发地详细地址"
+              v-model="item.senderPhone"
+              placeholder="请输入发货人电话"
               maxlength="20"
               size="small"
             ></el-input>
@@ -296,40 +307,40 @@
         </ws-info-table>
         <ws-info-table>
           <el-form-item label="收货地区" span="1" prop="bulkDensity">
-            <el-select
-              v-model="deptBudgetList.contractNo"
-              placeholder="货名"
-              class="typeselect"
-              @change="selectstorageType"
-            >
-              <el-option
-                v-for="item in storageType"
-                :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
-              ></el-option>
-            </el-select>
+            <el-cascader
+              :options="options_"
+              v-model="item.selectedOptions1"
+              clearable
+              size="large"
+              placeholder="请选择收货地区"
+              style="width: 200%"
+              @change="
+                (val) => {
+                  handleChange4(val, index)
+                }
+              "
+            />
           </el-form-item>
           <el-form-item label="收货地详细地址" span="1" prop="impurity">
             <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入始发地详细地址"
+              v-model="item.receiveDetailedAddress"
+              placeholder="请输入收货地详细地址"
               maxlength="20"
               size="small"
             ></el-input>
           </el-form-item>
           <el-form-item label="收货人" span="1" prop="bulkDensity">
             <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入始发地详细地址"
+              v-model="item.receiver"
+              placeholder="请输入收货人"
               maxlength="20"
               size="small"
             ></el-input>
           </el-form-item>
           <el-form-item label="收货人电话" span="1" prop="bulkDensity">
             <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入始发地详细地址"
+              v-model="item.receiverPhone"
+              placeholder="请输入收货人电话"
               maxlength="20"
               size="small"
             ></el-input>
@@ -352,7 +363,7 @@
 <script>
 import { packList } from '@/model/contarct/index'
 import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
-import { addTranTask, getwarehousename } from '@/model/tasksport/index'
+import { addtrantask, getwarehousename, xialaNo } from '@/model/tasksport/index'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
 export default {
@@ -379,7 +390,31 @@ export default {
         goodsName: '玉米',
         goodsNameKey: 1,
         warehouseType: '1',
-        driverPayeeInfo: {},
+        tranProcessInfoList: [
+          {
+            processNo: '',
+            tranType: '汽运',
+            tranTypeKey: '1',
+            deliveryDateStart: '',
+            deliveryDateEnd: '',
+            weight: '13',
+            selectedOptions: [],
+            selectedOptions1: [],
+            sendPrivate: '',
+            sendCity: '',
+            sendArea: '',
+            receivePrivate: '',
+            receiveCity: '',
+            receiveArea: '',
+            sendDetailedAddress: '',
+            receiveDetailedAddress: '',
+            sender: '',
+            receiver: '',
+            senderPhone: '',
+            receiverPhone: '',
+            endFlag: '0',
+          },
+        ],
       },
       radio: '1',
       options_: regionData,
@@ -387,32 +422,21 @@ export default {
       zoom: 7,
       selectedOptions: [],
       selectedOptions1: [],
-      center: [116.244694, 39.517344],
       window: '',
       district: null,
       goodnameList: [],
       listDate: { country: '中国', level: 'country', city: '' },
       citylist: [],
       taskType: [],
+      taskwayList: [],
       contractNoList: [],
       compId: sessionStorage.getItem('ws-pf_compId'),
       mainReportAdd: {},
       appendixIdsAdd: '',
-
+      warehouseList: [],
       size: 10,
       value1: '',
       unitList: [],
-      freightspace: [
-        {
-          waterContent: '',
-          taskType: '高栏',
-          goodsName: '1',
-          weight: '13',
-          carLengthKey: '1',
-          carLoad: '',
-          yearManufacture: '',
-        },
-      ],
       name: '',
       age: '',
     }
@@ -421,7 +445,19 @@ export default {
     this.loaddata()
     this.showType = this.isShow
   },
-  computed: {},
+  computed: {
+    warehouse: function () {
+      if (
+        this.deptBudgetList.taskType == '销售出库' ||
+        this.deptBudgetList.taskType == '贸易服务出库' ||
+        this.deptBudgetList.taskType == '暂存出库'
+      ) {
+        return true
+      } else {
+        return false
+      }
+    },
+  },
   methods: {
     // 获取当前年月日
     getdate() {
@@ -460,18 +496,33 @@ export default {
         .then((response) => {
           this.goodnameList = response
         })
+      // 任务类型
       packList({ constId: 'TRAN3' })
         .toPromise()
         .then((response) => {
           this.taskType = response
         })
+      // 运输方式
+      packList({ constId: 'TRAN6' })
+        .toPromise()
+        .then((response) => {
+          this.taskwayList = response
+        })
+
       getwarehousename({
         compId: this.compId,
         warehouseType: this.deptBudgetList.warehouseType,
       })
         .toPromise()
         .then((response) => {
-          this.taskType = response
+          this.warehouseList = response
+        })
+      xialaNo({
+        compId: this.compId,
+      })
+        .toPromise()
+        .then((response) => {
+          this.contractNoList = response
         })
       // // 车型
       // packList({ constId: 'TRAN1' })
@@ -495,85 +546,152 @@ export default {
       this.dialogViewSpareMoney = false
     },
     add() {
-      this.freightspace.push({
-        carNumber: '',
-        carModel: '高栏',
-        carModelKey: '1',
-        carLength: '13',
-        carLengthKey: '1',
-        carLoad: '',
-        yearManufacture: '',
+      this.deptBudgetList.tranProcessInfoList.push({
+        tranType: '汽运',
+        tranTypeKey: '1',
+        deliveryDateStart: '',
+        deliveryDateEnd: '',
+        weight: '13',
+        selectedOptions: [],
+        selectedOptions1: [],
+        sendPrivate: '',
+        sendCity: '',
+        sendArea: '',
+        receivePrivate: '',
+        receiveCity: '',
+        receiveArea: '',
+        sendDetailedAddress: '',
+        receiveDetailedAddress: '',
+        sender: '',
+        receiver: '',
+        senderPhone: '',
+        receiverPhone: '',
+        endFlag: '0',
       })
     },
     del(index) {
-      if (this.freightspace.length > 1) {
-        this.freightspace.splice(index, 1)
+      if (this.deptBudgetList.tranProcessInfoList.length > 1) {
+        this.deptBudgetList.tranProcessInfoList.splice(index, 1)
       }
     },
     handleChange(value) {
       this.selectedOptions = value
+      this.deptBudgetList.startPrivate = CodeToText[value[0]]
+      this.deptBudgetList.startCity = CodeToText[value[1]]
+      this.deptBudgetList.startArea = CodeToText[value[2]]
     },
     handleChange1(value) {
       this.selectedOptions1 = value
+      this.deptBudgetList.endPrivate = CodeToText[value[0]]
+      this.deptBudgetList.endCity = CodeToText[value[1]]
+      this.deptBudgetList.endArea = CodeToText[value[2]]
+    },
+    handleChange3(value, index) {
+      this.deptBudgetList.tranProcessInfoList[index].sendPrivate =
+        CodeToText[value[0]]
+      this.deptBudgetList.tranProcessInfoList[index].sendCity =
+        CodeToText[value[1]]
+      this.deptBudgetList.tranProcessInfoList[index].sendArea =
+        CodeToText[value[2]]
+    },
+    handleChange4(value, index) {
+      this.deptBudgetList.tranProcessInfoList[index].receivePrivate =
+        CodeToText[value[0]]
+      this.deptBudgetList.tranProcessInfoList[index].receiveCity =
+        CodeToText[value[1]]
+      this.deptBudgetList.tranProcessInfoList[index].receiveArea =
+        CodeToText[value[2]]
     },
     returnsales() {
       this.$router.push({ path: 'tranManagementTransport' })
     },
-  },
-  selecttaskType(e) {
-    for (var i = 0; i < this.taskType.length; i++) {
-      if (this.taskType[i].constValue == e) {
-        this.deptBudgetList.taskTypeKey = this.taskType[i].constKey
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskType.length; i++) {
+        if (this.taskType[i].constValue == e) {
+          this.deptBudgetList.taskTypeKey = this.taskType[i].constKey
+        }
       }
-    }
-  },
-  selectcontractNo(e) {
-    for (var i = 0; i < this.contractNoList.length; i++) {
-      if (this.contractNoList[i].constValue == e) {
-        this.deptBudgetList.contractNoKey = this.contractNoList[i].constKey
+    },
+    selecttaskwayList(e, index) {
+      for (var i = 0; i < this.taskwayList.length; i++) {
+        if (this.taskwayList[i].constValue == e) {
+          this.deptBudgetList.tranProcessInfoList[index].tranTypeKey =
+            this.taskwayList[i].constKey
+        }
       }
-    }
-  },
-  selectgoodsname(e) {
-    for (var i = 0; i < this.goodnameList.length; i++) {
-      if (this.goodnameList[i].constValue == e) {
-        this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+    },
+    selectgoodsname(e) {
+      for (var i = 0; i < this.goodnameList.length; i++) {
+        if (this.goodnameList[i].constValue == e) {
+          this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+        }
       }
-    }
-  },
-  onChange(files) {
-    this.fileNum = files
-    this.$refs.upload.handleSaveBill().then((res) => {
-      console.log(files)
-    })
-  },
-
-  submit() {
-    console.log(this.freightspace)
+    },
+    onChange(files) {
+      this.fileNum = files
+      this.$refs.upload.handleSaveBill().then((res) => {
+        console.log(files)
+      })
+    },
 
-    this.$refs.deptBudgetList.validate((valid) => {
-      if (valid) {
-        this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
-        // this.deptBudgetList.residentCityProvincial =
-        //   CodeToText[this.selectedOptions[0]]
-        // this.deptBudgetList.residentCityMunicipal =
-        //   CodeToText[this.selectedOptions[1]]
-        // this.deptBudgetList.driverCarInfoList = this.freightspace
-        // this.deptBudgetList.driverPayeeInfoList = this.freightspace1
-        addTranTask(this.deptBudgetList)
-          .toPromise()
-          .then((response) => {
-            this.$message.success('添加成功')
-            this.$router.push({ path: 'tranManagementTransport' })
-          })
-      } else {
-        EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-        return false
-      }
-    })
-  },
-  resetForm(deptBudgetList) {
-    this.$refs[deptBudgetList].resetFields()
+    submit() {
+      this.$refs.deptBudgetList.validate((valid) => {
+        if (valid) {
+          for (
+            var i = 0;
+            i < this.deptBudgetList.tranProcessInfoList.length;
+            i++
+          ) {
+            this.deptBudgetList.tranProcessInfoList[i].processNo =
+              this.deptBudgetList.taskNo + (i + 1)
+          }
+          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
+          this.deptBudgetList.tranType = this.checkList.toString()
+          addtrantask(this.deptBudgetList)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('添加成功')
+              this.deptBudgetList = {
+                taskNo: '',
+                totalStorage: 0,
+                goodsName: '玉米',
+                goodsNameKey: 1,
+                warehouseType: '1',
+                tranProcessInfoList: [
+                  {
+                    processNo: '',
+                    tranType: '汽运',
+                    deliveryDateStart: '',
+                    deliveryDateEnd: '',
+                    weight: '13',
+                    selectedOptions: [],
+                    selectedOptions1: [],
+                    sendPrivate: '',
+                    sendCity: '',
+                    sendArea: '',
+                    receivePrivate: '',
+                    receiveCity: '',
+                    receiveArea: '',
+                    sendDetailedAddress: '',
+                    receiveDetailedAddress: '',
+                    sender: '',
+                    receiver: '',
+                    senderPhone: '',
+                    receiverPhone: '',
+                  },
+                ],
+              }
+              this.$router.push({ path: 'tranManagementTransport' })
+            })
+        } else {
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
+        }
+      })
+    },
+    resetForm(deptBudgetList) {
+      this.$refs[deptBudgetList].resetFields()
+    },
   },
 }
 </script>

File diff suppressed because it is too large
+ 475 - 431
src/views/taskManagement/tranManagementTransportEdit.vue


+ 10 - 17
src/views/tranManagement/tranManagementDriver.vue

@@ -3,14 +3,7 @@
   <div>
     <BaseHeaderLayout :leftSpan="20">
       <template slot="right">
-        <ws-button
-          type="primary"
-          @click="handleAdd()"
-          v-hasPermission="
-            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-          "
-          >添加</ws-button
-        >
+        <ws-button type="primary" @click="handleAdd()">添加</ws-button>
       </template>
       <template slot="left">
         <!-- <ws-select
@@ -393,7 +386,7 @@ export default {
       searchTypeText: '',
       outerVisible: false,
       //图片
-      fileList:[],
+      fileList: [],
       // 提交类型
       submitType: true,
       size: 10,
@@ -439,10 +432,10 @@ export default {
     },
     //查找
     handleLook() {
-      if(this.value2){
-        this.startDate = this.dateFormat('YYYY-mm-dd',this.value2[0])
-        this.endDate = this.dateFormat('YYYY-mm-dd',this.value2[1])
-      }else{
+      if (this.value2) {
+        this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
+        this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
+      } else {
         this.startDate = ''
         this.endDate = ''
       }
@@ -566,7 +559,7 @@ export default {
             if (response.records[i].addressUrl != null) {
               response.records[i].addressUrlArray =
                 response.records[i].addressUrl.split(',')
-                this.fileList[i] = response.records[i].addressUrl.split(',')
+              this.fileList[i] = response.records[i].addressUrl.split(',')
             } else {
               response.records[i].addressUrlArray = []
             }
@@ -576,7 +569,7 @@ export default {
           this.deptCircularPage.pageSize = response.size
           this.deptBudgetTotal = response.total
           this.driverList = response
-          console.log(this.fileList,1212121212121212)
+          console.log(this.fileList, 1212121212121212)
         })
     },
     editClick(row) {
@@ -611,9 +604,9 @@ export default {
         })
     },
     selecttaskType(e) {
-      this.currentPage =1
+      this.currentPage = 1
       this.getList()
-       
+
       // this.selectedOptions = e
     },
     fujian(row) {

+ 7 - 2
src/views/tranManagement/tranManagementDriverAdd.vue

@@ -81,6 +81,7 @@
             class="readonly"
           >
             <ws-input
+              @input="cardchange"
               v-model="deptBudgetList.numberCard"
               placeholder="请输入身份证号"
               maxlength="100"
@@ -88,7 +89,7 @@
             />
           </ws-form-item>
         </ws-info-table>
-        {{ age }}
+        {{ age }}
       </div>
     </ws-form>
 
@@ -560,7 +561,6 @@ export default {
       citylist: [],
       compId: sessionStorage.getItem('ws-pf_compId'),
       mainReportAdd: {},
-      appendixIdsAdd: '',
       size: 10,
       value1: '',
       unitList: [],
@@ -598,6 +598,11 @@ export default {
   },
   computed: {},
   methods: {
+    cardchange(e) {
+      if (e.length == 15 || e.length == 18) {
+        this.IdCard(e)
+      }
+    },
     IdCard(UUserCard) {
       //获取年龄
       var myDate = new Date()

+ 136 - 97
src/views/tranManagement/tranManagementTransporFeedback.vue

@@ -3,7 +3,7 @@
   <div class="container">
     <el-row>
       <el-col :span="12">
-        <h2 class="bg-left title">车次安排</h2>
+        <h2 class="bg-left title">汽运装车反馈</h2>
       </el-col>
       <el-col :span="12" class="bg-right">
         <el-button
@@ -92,16 +92,18 @@
       </ws-info-table>
       <div class="small-title">装车详情</div>
       <div class="liaison">
-        <ws-info-table>
-          <div
-            style="width: 100%"
-            class="flex position"
-            v-for="(item, index) in freightspace"
-          >
+        <div
+          style="width: 100%"
+          class="flex position"
+          v-for="(item, index) in this.freightspace"
+          :key="index"
+        >
+          <ws-info-table>
             <!--司机-->
-            <ws-form-item :label="'司机'+(index+1)" span="1" prop="driver">
-              <el-select
-                v-model="deptBudgetList.tranCarInfoList[0].driver"
+            <ws-form-item :label="'司机' + (index + 1)" span="1" prop="driver">
+               <el-select
+                v-show="item.temporaryDriverFlag != 0"
+                v-model="item.driver"
                 placeholder="请选择司机"
                 filterable
                 :filter-method="dataFilter"
@@ -113,51 +115,63 @@
                   :label="item.staffName"
                   :value="item.staffName"
                 />
-              </el-select>
+               
+              </el-select> 
+               <span v-show="item.temporaryDriverFlag == 0">{{item.driver}} </span> 
+                   
             </ws-form-item>
             <!--电话-->
             <ws-form-item label="司机电话" span="1" prop="driverPhone">
-              <ws-input
-                v-model="deptBudgetList.driverPhone"
+               <ws-input
+               v-show="item.temporaryDriverFlag != 0"
+                v-model="item.driverPhone"
                 placeholder="请输入司机电话"
                 maxlength="20"
                 size="small"
-              />
+              /> 
+             <span v-show="item.temporaryDriverFlag == 0">{{item.driverPhone}} </span> 
             </ws-form-item>
             <!--车牌号-->
-            <ws-form-item label="车牌号" span="1" prop="sendDateStart">
+            <ws-form-item label="车牌号" span="1" prop="carNo">
                <ws-input
-                v-model="deptBudgetList.driverPhone"
-                placeholder="请输入司机电话"
+               v-show="item.temporaryDriverFlag != 0"
+                v-model="item.carNo"
+                placeholder="请输入车牌号"
                 maxlength="20"
                 size="small"
-              />
+              /> 
+             <span v-show="item.temporaryDriverFlag == 0">{{item.carNo}} </span> 
             </ws-form-item>
             <!--装车净重-->
-            <ws-form-item label="装车净重" span="1" prop="receiveDateEnd">
+            <ws-form-item label="装车净重" span="1" prop="loadNetWeight">
               <ws-input
-                v-model="deptBudgetList.driverPhone"
-                placeholder="请输入司机电话"
+                v-model="item.loadNetWeight"
+                placeholder="请输入装车净重"
                 maxlength="20"
                 size="small"
               />
             </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-form-item label="磅单" span="1" prop="loadPoundImg">
+              <template slot-scope="scope">
+              
+                <img
+                  width="18"
+                  height="20"
+                  style="
+                    vertical-align: text-top;
+                    position: relative;
+                    top: -1px;
+                  "
+                  src="../../../public/img/fujian.png"
+                  @click="fujian(scope.row)"
+                  alt=""
                 />
-              </ws-select>
+                <span v-show="item.temporaryDriverFlag == 0" >{{item.signStatus}}</span>
+              </template>
             </ws-form-item>
             <img
+            v-show="item.temporaryDriverFlag != 0"
               width="22"
               height="22"
               class="del"
@@ -165,11 +179,11 @@
               src="../../../public/img/del.png"
               alt=""
             />
-          </div>
-        </ws-info-table>
+          </ws-info-table>
+        </div>
       </div>
       <el-button class="add bg-bottom" type="primary" size="small" @click="add"
-        >添加车</el-button
+        >添加临时用车</el-button
       >
     </ws-form>
     <!-- 提交 -->
@@ -182,11 +196,32 @@
         >提交</el-button
       >
     </div>
+    <WinseaContentModal
+      v-model="accessoryTFs"
+      :title="$t('system.noticeCircular.information')"
+      @on-cancel="handleClose"
+    >
+      <p>上传附件</p>
+      <ws-upload
+        ref="upload"
+        table-name="maintain_work_order"
+        oss-key="mainPlan"
+        :comp-id="compId"
+        :file-list="fileList"
+        :appendix-ids="appendixIdsAdd"
+        :vesselId="deptBudgetList.loadPoundImg"
+        :size-limit="size"
+        @uploadSuccess="uploadSuccess"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+      />
+    </WinseaContentModal>
+
+
   </div>
 </template>
 <script>
 import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
-import { seeCat, dispatchCat, packList } from '@/model/transport/index'
+import { seeCat, packList, feedback } from '@/model/transport/index'
 import { getstaff } from '@/model/warehouse/index'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
@@ -206,7 +241,6 @@ export default {
   },
   data() {
     return {
-      staffList: [],
       deptBudgetList: {
         totalStorage: 0,
       },
@@ -223,7 +257,6 @@ export default {
       listDate: { country: '中国', level: 'country', city: '' },
       citylist: [],
       compId: sessionStorage.getItem('ws-pf_compId'),
-      tranType: 2,
       rules: {
         warehouseName: [
           {
@@ -239,22 +272,27 @@ export default {
           },
         ],
       },
-      appendixIdsAdd: '',
+       tranType: 1,
       size: 10,
       value1: '',
       unitList: [],
       freightspace: [
         {
-          trainNo: '',
+          driver: '',
+          driverPhone: '',
+          carNo: '',
+          loadNetWeight: '',
         },
       ],
       name: '',
-
       staffList: [],
       options: [],
       carModel: [],
       tranCarInfoList: {},
-      arr: [],
+      //上传
+      accessoryTFs:false,
+      fileList:[],
+        appendixIdsAdd: '',
     }
   },
   mounted() {
@@ -288,8 +326,11 @@ export default {
     },
     selectstaff(e) {
       for (var i = 0; i < this.staffList.length; i++) {
-        if (this.staffList[i].staffName == e) {
+        if (this.staffList[i].staffName == e) {     
           this.deptBudgetList.driverPhone = this.staffList[i].staffMobilePhone
+         this.freightspace[i].driverPhone = this.staffList[i].staffMobilePhone
+          // this.deptBudgetList.tranCarInfoList[i].driverPhone = this.staffList[i].staffMobilePhone
+          console.log(this.freightspace[i].driverPhone,"dianhu")
           this.deptBudgetList.personChargeKey = this.staffList[i].staffId
         }
       }
@@ -312,7 +353,10 @@ export default {
     },
     add() {
       this.freightspace.push({
-        trainNo: '',
+        driver: '',
+        driverPhone: '',
+        carNo: '',
+        loadNetWeight: '',
       })
     },
     del(index) {
@@ -329,7 +373,7 @@ export default {
       this.deptBudgetList = {}
       this.freightspace = {}
       this.selectedOptions = ''
-      this.$router.push({ path: 'tranManagementTransporTationFire' })
+      this.$router.push({ path: 'tranManagementTransporHairRespond' })
     },
     // confirmPosition() {
     //   this.draggable = false
@@ -338,45 +382,48 @@ export default {
     uploadSuccess(data, files, url) {
       console.log(data, files, url)
     },
+    handleClose() {
+      this.accessoryTFs = false
+    },
     submit() {
-      this.$confirm(`提交成功后,任务将下发给相关人员,是否确定提交?`, {
+      this.$confirm(`提交成功后提醒司机及时签订运输合同,确定提交装车信息?`, {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning',
       })
         .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
-
+             if (valid) {
+              // this.deptBudgetList.totalStorage = this.totalStorage
+              this.tranCarInfoList=this.freightspace    
               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.boxNo = this.arr.toString()
-              var tranCarInfo = {}
-              var tranList = [this.tranCarInfoList]
-              tranCarInfo.id = this.deptBudgetList.id
-              tranCarInfo.infoId = this.deptBudgetList.infoId
-              tranCarInfo.tranCarInfoList = tranList
+              this.tranCarInfoList.carNo =this.deptBudgetList.carNo
+              this.tranCarInfoList.loadNetWeight =this.deptBudgetList.loadNetWeight
+             this.tranCarInfoList.tranType = this.tranType
+              this.tranCarInfoList.loadPoundImg = this.deptBudgetList.loadPoundImg
+              // this.tranCarInfoList.boxNo = this.arr.toString()
+               for(var i = 0 ; i< this.tranCarInfoList.length ; i++){
+                 this.tranCarInfoList[i].id = this.freightspace[i].id
+                 if(this.tranCarInfoList[i].temporaryDriverFlag !=0){
+                   this.tranCarInfoList[i].temporaryDriverFlag = 1
+                   this.tranCarInfoList[i].tranType = this.tranType
+                 }
+              }
+              var tranProcessInfo = {}
+              tranProcessInfo.id = this.deptBudgetList.id
+              tranProcessInfo.infoId = this.deptBudgetList.infoId
+              tranProcessInfo.tranCarInfoList = this.tranCarInfoList         
               // dispatchCat({tranCarInfo:{tranCarInfoList:[this.tranCarInfoList],id:this.deptBudgetList.id}
-              dispatchCat(tranCarInfo)
+              feedback(tranProcessInfo)
                 .toPromise()
                 .then((response) => {
-                  this.$message.success('添加成功')
+                  this.$message.success('提交成功')
                   this.deptBudgetList = {}
                   this.freightspace = {}
                   this.selectedOptions = ''
                   this.$router.push({
-                    path: 'tranManagementTransporTationFire',
+                    path: 'tranManagementTransporHairRespond',
                   })
                 })
             } else {
@@ -397,6 +444,13 @@ export default {
         .toPromise()
         .then((response) => {
           this.deptBudgetList = response
+          //  this.deptBudgetList.tranCarInfoList = response.tranCarInfoList
+          this.freightspace = response.tranCarInfoList
+          for (var i = 0; i < this.freightspace.length; i++) {
+            if (!this.freightspace[i].loadNetWeight) {
+              this.freightspace[i].loadNetWeight = 0
+            }
+          }
         })
       //司机姓名下拉
       getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
@@ -452,35 +506,20 @@ export default {
         }
       }
     },
-    // 编辑
-    editClick(item, index) {
-      const map = JSON.parse(JSON.stringify(item))
-      if (Object.is(item.id, 1)) {
-        return
-      }
-      if (Object.is(this.unitList[index].flag, 'delete')) {
-        map.flag = 'check'
-        this.$set(this.unitList, index, map)
+    //上传
+    fujian(row) {
+      if (
+        row.receiveAttachmentPath === null ||
+        row.receiveAttachmentPath === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
       } else {
-        map.flag = 'delete'
-        this.$set(this.unitList, index, map)
+        this.accessoryTFs = true
       }
-    },
-    // 删除
-    deleteClick(item, index) {
-      if (Object.is(item.constKey, 1)) {
-        return
-      }
-      if (!item.constValue) {
-        this.unitList.splice(index, 1)
-        return
-      }
-      delxiala({ id: this.unitList[index].id })
-        .toPromise()
-        .then((response) => {
-          this.getUnitList()
-          this.pleaseChoose = ''
-        })
+      this.appendixIdss = row.receiveAttachmentPath
     },
   },
 }

+ 58 - 45
src/views/tranManagement/tranManagementTransporHairRespond.vue

@@ -3,23 +3,11 @@
   <div>
     <BaseHeaderLayout :leftSpan="12">
       <template slot="left">
-        <ws-button
-          class="but"
-          type="primary"
-          @click="handleAdd()"
-        >
+        <ws-button class="but" type="primary" @click="handleAdd()">
           执行中</ws-button
         >
-        <ws-button
-          class="but"
-          @click="handleLook()" 
-          >已完成</ws-button
-        >
-        <ws-button
-          class="but"
-          @click="handleEdit()"  
-          >全部任务</ws-button
-        >
+        <ws-button class="but" @click="handleLook()">已完成</ws-button>
+        <ws-button class="but" @click="handleEdit()">全部任务</ws-button>
       </template>
       <!-- 接单开始 -->
       <template slot="left">
@@ -44,10 +32,7 @@
           type="input"
           class="findValue"
         ></ws-input>
-        <ws-button
-          class="find"
-          type="primary"
-          @click="find()"
+        <ws-button class="find" type="primary" @click="find()"
           ><img
             width="16"
             height="16"
@@ -77,22 +62,22 @@
         </el-table-column>
         <el-table-column prop="processNo" label="运输任务编号" width="120">
         </el-table-column>
-        <el-table-column prop="goodsName" label="运输方式" width="80">
+        <el-table-column prop="tranType" label="运输方式" width="80">
         </el-table-column>
-         <el-table-column prop="goodsName" label="货名" width="80">
+        <el-table-column prop="goodsName" label="货名" width="80">
         </el-table-column>
         <el-table-column prop="weight" label="重量(吨)" width="120">
         </el-table-column>
-        <el-table-column prop="send" label="发货" width="160">
+        <el-table-column prop="send" label="发货" width="200">
         </el-table-column>
-        <el-table-column prop="receive" label="收货" width="160">
+        <el-table-column prop="receive" label="收货" width="200">
         </el-table-column>
         <el-table-column prop="tranCycle" label="运输周期" width="160">
           <template scope="scope">
             {{ scope.row.deliveryDateStart }} ~ {{ scope.row.deliveryDateEnd }}
           </template>
         </el-table-column>
-        <el-table-column prop="status" label="状态">
+        <el-table-column prop="feedbackStatus" label="状态">
           <template slot-scope="scope">
             <el-popover
               placement="left"
@@ -104,20 +89,27 @@
               <template>
                 <span slot="reference">
                   <span
-                    v-if="scope.row.status == '待执行'"
+                    v-if="scope.row.feedbackStatus == '待执行'"
                     class="executory"
                   ></span>
                   <span
-                    v-if="scope.row.status == '执行中'"
+                    v-if="scope.row.feedbackStatus == '执行中'"
                     class="inExecution"
                   ></span>
-                  <span v-if="scope.row.status == '已完成'" class="done"></span
-                  >{{ scope.row.status }}
+                  <span
+                    v-if="scope.row.feedbackStatus == '已完成'"
+                    class="done"
+                  ></span
+                  >{{ scope.row.feedbackStatus }}
                 </span>
               </template>
               <div>
                 <p style="margin-top: 0; padding-left: 10px">XXXXX</p>
-                <div v-for="(item, index) in historyList" class="flex">
+                <div
+                  v-for="(item, index) in historyList"
+                  class="flex"
+                  :key="index"
+                >
                   <div class="vertical-text vertical-text-left">
                     {{ item.updateDate }}
                   </div>
@@ -151,7 +143,11 @@
             <ws-button class="completed" @click="trainSee(scope.row)">
               查看
             </ws-button>
-            <ws-button class="putstorage" @click="feedback(scope.row)">
+            <ws-button
+              class="putstorage"
+              @click="feedback(scope.row)"
+              v-show="scope.row.tranType == '汽运'"
+            >
               反馈
             </ws-button>
           </template>
@@ -161,7 +157,7 @@
   </div>
 </template>
 <script>
-import { automobileList } from '@/model/transport/index'
+import { automobileList, state } from '@/model/transport/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -255,29 +251,45 @@ export default {
     },
     //查看火运调度详细
     trainSee(row) {
-      this.$router.push({
-        
-      })
+      if (row.tranType == '汽运') {
+        this.$router.push({
+          path: 'tranManagementVehicleLook',
+          query: {
+            id: row.id,
+          },
+        })
+      }else if(row.tranType == '火运'){
+         this.$router.push({
+          path: 'tranManagementTransporTrainDetails',
+          query: {
+            id: row.id,
+          },
+        })
+      }else if(row.tranType == '船运'){
+        this.$router.push({
+          path: 'tranManagementShippingLook',
+          query: {
+            id: row.id,
+          },
+        })
+      }  
     },
     //反馈
     feedback(row) {
       this.$router.push({
         path: 'tranManagementTransporFeedback',
+        query: {
+          id: row.id,
+        },
       })
     },
 
     //已完成
-    handleLook() {
-      
-    },
+    handleLook() {},
     //待完成
-    handleAdd() {
-      
-    },
+    handleAdd() {},
     //全部任务
-    handleEdit() {
-      
-    },
+    handleEdit() {},
 
     dateFormat(fmt, date) {
       let ret
@@ -320,7 +332,6 @@ export default {
         contractType: this.contractType,
         currentPage: this.currentPage,
         pageSize: this.pageSize,
-        tranTypeKey: this.tranTypeKey,
       })
         .toPromise()
         .then((response) => {
@@ -341,7 +352,9 @@ export default {
         type: 'warning',
       })
         .then(() => {
-          editstatus({ id: row.id })
+          state({
+            id: row.id,
+          })
             .toPromise()
             .then((response) => {
               this.$notify.success({

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

@@ -67,9 +67,9 @@
         </el-table-column>
         <el-table-column prop="weight" label="重量(吨)" width="120">
         </el-table-column>
-        <el-table-column prop="send" label="发货" width="160">
+        <el-table-column prop="send" label="发货" width="200">
         </el-table-column>
-        <el-table-column prop="receive" label="收货" width="160">
+        <el-table-column prop="receive" label="收货" width="200">
         </el-table-column>
         <el-table-column prop="tranCycle" label="运输周期" width="160">
           <template scope="scope">
@@ -101,7 +101,7 @@
               </template>
               <div>
                 <p style="margin-top: 0; padding-left: 10px">XXXXX</p>
-                <div v-for="(item, index) in historyList" class="flex">
+                <div v-for="(item, index) in historyList" class="flex" :key="index">
                   <div class="vertical-text vertical-text-left">
                     {{ item.updateDate }}
                   </div>
@@ -255,7 +255,7 @@ export default {
       })
     },
 
-    //执行中
+    //待完成
     handleLook() {},
     //已完成
     handleAdd() {},

+ 154 - 135
src/views/tranManagement/tranManagementTransporTrainDetails.vue

@@ -22,7 +22,7 @@
       </el-col>
     </el-row>
 
-   <ws-form
+    <ws-form
       class="position"
       ref="deptBudgetList"
       :rules="rules"
@@ -30,107 +30,108 @@
     >
       <div class="small-title">任务详情</div>
       <ws-info-table>
-        
-         <ws-form-item label="任务编号" span="1" prop="processNo">
+        <!--任务编号-->
+        <ws-form-item label="任务编号" span="1" prop="processNo">
           {{ deptBudgetList.processNo }}
         </ws-form-item>
-        
+        <!--货名-->
         <ws-form-item label="货名" span="1" prop="goodsName">
           {{ deptBudgetList.goodsName }}
         </ws-form-item>
-       
+        <!--重量(吨)-->
         <ws-form-item label="重量(吨)" span="1" prop="weight">
           {{ deptBudgetList.weight }}
         </ws-form-item>
-    
+        <!--发货地址-->
         <ws-form-item label="发货地址" span="1" prop="sendDetailedAddress">
-         {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
-          }}{{ deptBudgetList.sendArea }} 
+          {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
+          }}{{ deptBudgetList.sendArea }}
         </ws-form-item>
-        
+
+        <!--发货人-->
         <ws-form-item label="发货人" span="1" prop="sender" class="readonly">
           {{ deptBudgetList.sender }}
         </ws-form-item>
-     
+
+        <!--发货人电话-->
         <ws-form-item
           label="发货人电话"
           span="1"
-          prop="sender"
+          prop="senderPhone"
           class="readonly"
         >
           {{ deptBudgetList.senderPhone }}
-          <!-- {{deptBudgetList.receivePrivate}} -->
         </ws-form-item>
-      
-          <ws-form-item label="收货地址" span="1">
-           <!-- {{ deptBudgetList.receivePrivate }} -->{{ deptBudgetList.receiveCity
-          }}{{ deptBudgetList.receiveArea }} 
+        <!--收货地址-->
+        <ws-form-item label="收货地址" span="1" prop="receiveDetailedAddress">
+          {{ deptBudgetList.receivePrivate }}{{ deptBudgetList.receiveCity
+          }}{{ deptBudgetList.receiveArea }}
         </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>
-    <div class="liaison" v-for="(item, index) in deptBudgetList.tranCarInfoList">
-      
-      <ws-info-table >
-        <ws-form-item label="姓名" span="1" prop="driver" >
-          {{item.driver}}
-          <!-- {{this.deptBudgetList.tranCarInfoList[0].driver}} -->
-        </ws-form-item>
-        <ws-form-item label="电话" span="1" prop="driverPhone" >
-          <!-- {{item.driverPhone}} -->
-        </ws-form-item>
-        <ws-form-item
-          label="发车日期"
-          span="1"
-          prop="sendDateStart"
-        >
-          <!-- {{this.deptBudgetList.tranCarInfoList[0].sendDateStart}} -->
-        </ws-form-item>
-        <ws-form-item
-          label="到站日期"
-          span="1"
-          prop="receiveDateEnd"
-        >
-          <!-- {{this.deptBudgetList.tranCarInfoList[0].receiveDateEnd}} -->
-        </ws-form-item>
-        <ws-form-item label="车型" span="1" prop="carModel">
-
-          <!-- {{this.deptBudgetList.tranCarInfoList[0].carModel}} -->
-        </ws-form-item>
-        <!-- <div
-          style="width: 100%"
-          class="flex position liaison1"
-          v-for="(item, index) in freightspace"
-        > -->
-
-          <ws-form-item label="车厢号" span="1" prop="trainNo" class="liaison">
-
-            <!-- {{item.trainNo}} -->
-          </ws-form-item>
-        <!-- </div> -->
       </ws-info-table>
+      <div class="small-title">联络员及车皮信息</div>
+      <div class="liaison" v-for="(item, index) in deptBudgetList.tranCarInfoList" :key="index">
+        <ws-info-table>
+          <!--姓名-->
+          <ws-form-item label="姓名" span="1" prop="driver">
+            {{ item.driver }}
+          </ws-form-item>
+          <!--电话-->
+          <ws-form-item label="电话" span="1" prop="driverPhone">
+            {{ item.driverPhone }}
+          </ws-form-item>
+          <!--发车日期-->
+          <ws-form-item label="发车日期" span="1" prop="sendDateStart">
+            {{ item.sendDateStart }}
+          </ws-form-item>
+          <!--到站日期-->
+          <ws-form-item label="到站日期" span="1" prop="receiveDateEnd">
+            {{ item.receiveDateEnd }}
+          </ws-form-item>
+          <!--车型-->
+          <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>
+          </div>
+        </ws-info-table>
       </div>
     </ws-form>
+
     <!-- 提交 -->
     <div style="text-align: right; padding: 10px" class="center">
       <el-button
@@ -145,7 +146,8 @@
 </template>
 <script>
 import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
-import { seeCat,automobileList } from '@/model/transport/index'
+import { seeCat, dispatchCat, packList } from '@/model/transport/index'
+import { getstaff } from '@/model/warehouse/index'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
 export default {
@@ -163,11 +165,11 @@ export default {
     },
   },
   data() {
-    let self = this
     return {
       staffList: [],
       deptBudgetList: {
-        tranCarInfoList:[]
+        totalStorage: 0,
+        tranCarInfoList: [],
       },
       options_: regionData,
       heightData: '600px',
@@ -176,12 +178,13 @@ export default {
       center: [116.244694, 39.517344],
       window: '',
       radio: 1,
-      receivePrivate:'',
       personCharge: [],
       district: null,
+      driverList: [],
       listDate: { country: '中国', level: 'country', city: '' },
       citylist: [],
       compId: sessionStorage.getItem('ws-pf_compId'),
+      tranType: 2,
       rules: {
         warehouseName: [
           {
@@ -201,44 +204,75 @@ export default {
       size: 10,
       value1: '',
       unitList: [],
-      freightspace: [],
+      freightspace: [
+        // {
+        //   trainNo: '',
+        // },
+      ],
       name: '',
       list: [],
+      staffList: [],
+      options: [],
+      carModel: [],
+      tranCarInfoList: {},
+      arr: [],
     }
   },
-  // mounted() {
-  //   this.getList()
-  // },
-  computed: {
-    // totalStorage: function () {
-    //   var maxStorage = 0
-    //   for (var i = 0; i < this.freightspace.length; i++) {
-    //     maxStorage += Number(this.freightspace[i].maxStorage)
-    //   }
-    //   return maxStorage
-    // },
-  },
-  activated() {
-    // this.deptBudgetList.id = this.$route.query.id
+  mounted() {
+    this.deptBudgetList.id = this.$route.query.id
     this.getList()
   },
+  computed: {
+    totalStorage: function () {
+      var maxStorage = 0
+      for (var i = 0; i < this.freightspace.length; i++) {
+        maxStorage += Number(this.freightspace[i].maxStorage)
+      }
+      return maxStorage
+    },
+  },
   methods: {
+    dataFilter(val) {
+      this.deptBudgetList.personCharge = val
+      if (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) {
+      this.deptBudgetList.warehousePositioning =
+        item.lnglat.lat + ',' + item.lnglat.lng
+    },
+    selectedAddress(e) {
+      this.deptBudgetList.warehousePositioning =
+        e.center.lat + ',' + e.center.lng
+    },
+    confirmPositioncity() {
+      this.listDate.level = 'city'
+      this.listDate.country = this.name
+    },
     // 关闭 dialog时 处理文件url 初始化upload组件
     handleClose() {
       this.dialogViewSpareMoney = false
     },
-    add() {
-      this.freightspace.push({
-        binNumber: '',
-        maxStorage: '',
-        remark: '',
-      })
-    },
-    del(index) {
-      if (this.freightspace.length > 1) {
-        this.freightspace.splice(index, 1)
-      }
-    },
+    //下拉司机姓名改变事件
+    selectdriver() {},
     handleChange(value) {
       this.selectedOptions = value
     },
@@ -255,44 +289,32 @@ export default {
     uploadSuccess(data, files, url) {
       console.log(data, files, url)
     },
-    // resetForm(deptBudgetList) {
-    //   this.$refs[deptBudgetList].resetFields()
-    // },
+    resetForm(deptBudgetList) {
+      this.$refs[deptBudgetList].resetFields()
+    },
 
     getList() {
-      // automobileList({
-      //   compId: sessionStorage.getItem('ws-pf_compId'),
-      //   currentPage: 1,
-      //   pageSize: 10,
-      // })
-      //   .toPromise()
-      //   .then((response) => {
-      //    console.log(response)
-      //   })
-      seeCat({ id: this.$route.query.id })
+      seeCat({ id: this.deptBudgetList.id })
         .toPromise()
         .then((response) => {
-          console.log(response.tranCarInfoList)
-        
-        this.receivePrivate=response.receivePrivate
           this.deptBudgetList = response
-          console.log()
-          // console.log(111,this.deptBudgetList)
-          //  this.freightspace = this.deptBudgetList.tranCarInfoList
-          //  for(var i = 0 ; i < this.deptBudgetList.tranCarInfoList.length;i++ ){
-          //    var varchar = this.deptBudgetList.tranCarInfoList[i].boxNo    
-          //    this.list.push(
-          //      this.list = varchar.split(",")
-          //     )
-          //  }
-          //  console.log(this.list,"字符串")
+          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,
+              })
+            }
+          }
         })
     },
     handleExamine() {},
     approve() {},
-    returnsales() {
-      this.$router.push({ path: 'purchaseContract' })
-    },
+    // returnsales() {
+    //   this.$router.push({ path: 'purchaseContract' })
+    // },
     selectChapterTwo(e) {
       for (var i = 0; i < this.ChapterTwoList.length; i++) {
         if (this.ChapterTwoList[i].constValue == e) {
@@ -393,7 +415,7 @@ export default {
   cursor: pointer;
 }
 .del {
-  right: 0px;
+  right: 0;
 }
 .amap-page-container {
   width: 300px;
@@ -430,10 +452,6 @@ export default {
   position: absolute;
   left: 0;
 }
-.ws-info-table {
-  border-left: 1px solid transparent;
-  border-top: 1px solid transparent;
-}
 .el-button--primary {
   background-color: #5878e8;
   border-color: #5878e8;
@@ -625,9 +643,7 @@ export default {
 .readonly {
   width: 16%;
 }
-.ws-info-table .el-form-item {
-  width: 33.33%;
-}
+
 //去边框
 /deep/.el-form-item {
   border-right: 0px;
@@ -675,14 +691,17 @@ export default {
   border-radius: 4px;
   border: 1px solid #d8dce6;
 }
+/deep/.flex .ws-info-table .el-form-item .el-form-item__content {
+  border: 0px;
+}
 //联络员及车次
 /deep/.liaison .ws-info-table .el-form-item {
   width: 20%;
 }
-/deep/.liaison.ws-info-table .el-form-item .el-form-item__label {
-  width: 33%;
+/deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
+  width: 25%;
 }
-/deep/.liaison .flex{
+/deep/.liaison .flex {
   display: contents;
 }
 </style>

+ 140 - 123
src/views/tranManagement/tranManagementTransporTrainNo.vue

@@ -32,156 +32,163 @@
       <ws-info-table>
         <!--任务编号-->
         <ws-form-item label="任务编号" span="1" prop="processNo">
-          {{deptBudgetList.processNo}}
+          {{ deptBudgetList.processNo }}
         </ws-form-item>
         <!--货名-->
         <ws-form-item label="货名" span="1" prop="goodsName">
-            {{deptBudgetList.goodsName}}
+          {{ deptBudgetList.goodsName }}
         </ws-form-item>
         <!--重量(吨)-->
         <ws-form-item label="重量(吨)" span="1" prop="weight">
-          {{deptBudgetList.weight}}
+          {{ deptBudgetList.weight }}
         </ws-form-item>
         <!--发货地址-->
         <ws-form-item label="发货地址" span="1" prop="sendDetailedAddress">
-           {{deptBudgetList.sendPrivate}}{{deptBudgetList.sendCity}}{{deptBudgetList.sendArea}}
+          {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
+          }}{{ deptBudgetList.sendArea }}
         </ws-form-item>
 
         <!--发货人-->
         <ws-form-item label="发货人" span="1" prop="sender" class="readonly">
-          {{deptBudgetList.sender}}
+          {{ deptBudgetList.sender }}
         </ws-form-item>
 
         <!--发货人电话-->
-        <ws-form-item label="发货人电话" span="1"  prop="senderPhone" class="readonly">
-          {{deptBudgetList.senderPhone}}
+        <ws-form-item
+          label="发货人电话"
+          span="1"
+          prop="senderPhone"
+          class="readonly"
+        >
+          {{ deptBudgetList.senderPhone }}
         </ws-form-item>
         <!--收货地址-->
         <ws-form-item label="收货地址" span="1" prop="receiveDetailedAddress">
-           {{deptBudgetList.receivePrivate}}{{deptBudgetList.receiveCity}}{{deptBudgetList.receiveArea}}
+          {{ deptBudgetList.receivePrivate }}{{ deptBudgetList.receiveCity
+          }}{{ deptBudgetList.receiveArea }}
         </ws-form-item>
         <!--收货人-->
         <ws-form-item label="收货人" span="1" prop="receiver">
-          {{deptBudgetList.receiver}}
+          {{ deptBudgetList.receiver }}
         </ws-form-item>
         <!--收货人电话-->
         <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
-          {{deptBudgetList.receiverPhone}}
+          {{ deptBudgetList.receiverPhone }}
         </ws-form-item>
         <!--发货日期-->
         <ws-form-item label="发货日期" span="1" prop="deliveryDateStart">
-          {{deptBudgetList.deliveryDateStart}}
+          {{ deptBudgetList.deliveryDateStart }}
         </ws-form-item>
         <!--最晚到货日期-->
         <ws-form-item label="最晚到货日期" span="1" prop="deliveryDateEnd">
-          {{deptBudgetList.deliveryDateEnd}}
+          {{ deptBudgetList.deliveryDateEnd }}
         </ws-form-item>
         <!--合同编号-->
         <ws-form-item label="合同编号" span="1" prop="contractNo">
-          {{deptBudgetList.contractNo}}
+          {{ deptBudgetList.contractNo }}
         </ws-form-item>
       </ws-info-table>
       <div class="small-title">联络员及车皮信息</div>
-     <div class="liaison">
-      <ws-info-table >
-        <!--姓名-->
-        <ws-form-item label="姓名" span="1" prop="driver">
-          <el-select
-            v-model="this.deptBudgetList.tranCarInfoList[0].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
-            v-model="this.deptBudgetList.tranCarInfoList[0].driverPhone"
-            placeholder="请输入电话"
-            maxlength="20"
-            size="small"
-          />
-        </ws-form-item>
-        <!--发车日期-->
-        <ws-form-item label="发车日期" span="1" prop="sendDateStart">
-          <ws-date-picker
-            v-model="this.deptBudgetList.tranCarInfoList[0].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="this.deptBudgetList.tranCarInfoList[0].receiveDateEnd"
-            type="date"
-            placeholder="请选择发货日期"
-            value-format="yyyy-MM-dd"
-          />
-        </ws-form-item>
-        <!--车型-->
-        <ws-form-item label="车型" span="1" prop="carModel">
-          <ws-select
-            v-model="this.deptBudgetList.tranCarInfoList[0].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
-          style="width: 100%"
-          class="flex position"
-          v-for="(item, index) in freightspace"
-        >
-          <!--车厢号-->
-          <ws-form-item
-            :label="'车厢号-' + (index + 1)"
-            span="1"
-            prop="trainNo"
-          >
+      <div
+        class="liaison"
+        v-for ="(item, index) in deptBudgetList.tranCarInfoList"
+        :key="index"
+      >
+        <ws-info-table>
+          <!--姓名-->
+          <ws-form-item label="姓名" span="1" prop="driver">
+            <el-select
+              v-model="item.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
-              v-model="item.trainNo"
-              placeholder="请输入车厢号"
+              v-model="item.driverPhone"
+              placeholder="请输入电话"
               maxlength="20"
               size="small"
             />
-            <img
-              width="22"
-              height="22"
-              class="del"
-              @click="del(index)"
-              src="../../../public/img/del.png"
-              alt=""
+          </ws-form-item>
+          <!--发车日期-->
+          <ws-form-item label="发车日期" span="1" prop="sendDateStart">
+            <ws-date-picker
+              v-model="item.sendDateStart"
+              type="date"
+              placeholder="请选择发货日期"
+              value-format="yyyy-MM-dd"
             />
           </ws-form-item>
-        </div>
-      </ws-info-table>
-     </div>
-       <el-button
-          class="add bg-bottom"
-          type="primary"
-          size="small"
-          @click="add"
-          >添加车厢</el-button
-        >
+          <!--到站日期-->
+          <ws-form-item label="到站日期" span="1" prop="receiveDateEnd">
+            <ws-date-picker
+              v-model="item.receiveDateEnd"
+              type="date"
+              placeholder="请选择到站日期"
+              value-format="yyyy-MM-dd"
+            />
+          </ws-form-item>
+          <!--车型-->
+          <ws-form-item label="车型" span="1" prop="carModel">
+            <ws-select
+              v-model="item.carModel"
+              placeholder="请输入车型"
+              class="typeselect"
+            >
+              <ws-option
+                v-for="items in carModel"
+                :key="items.constKey"
+                :label="items.constValue"
+                :value="items.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+        </ws-info-table>
+        <ws-info-table>
+          <div
+            style="width: 100%"
+            class="flex position"
+            v-for="(item1, index) in freightspace"
+            :key="index"
+          >
+            <!--车厢号-->
+            <ws-form-item
+              :label="'车厢号-' + (index + 1)"
+              span="1"
+              prop="boxNo"
+            >
+              <ws-input
+                v-model="item1.trainNo"
+                placeholder="请输入车厢号"
+                maxlength="20"
+                size="small"
+              />
+              <img
+                width="22"
+                height="22"
+                class="del"
+                @click="del(index)"
+                src="../../../public/img/del.png"
+                alt=""
+              />
+            </ws-form-item>
+          </div>
+        </ws-info-table>
+      </div>
+      <el-button class="add bg-bottom" type="primary" size="small" @click="add"
+        >添加车厢</el-button
+      >
     </ws-form>
 
     <!-- 提交 -->
@@ -256,9 +263,9 @@ export default {
       value1: '',
       unitList: [],
       freightspace: [
-        {
-          trainNo: '',
-        },
+        // {
+        //   trainNo: '',
+        // },
       ],
       name: '',
       list: [],
@@ -266,7 +273,7 @@ export default {
       options: [],
       carModel: [],
       tranCarInfoList: {},
-      arr:[],
+      arr: [],
     }
   },
   mounted() {
@@ -301,7 +308,8 @@ export default {
     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.driverPhone = this.staffList[i].staffMobilePhone
+             this.deptBudgetList.tranCarInfoList[0].driverPhone = this.staffList[i].staffMobilePhone
           this.deptBudgetList.personChargeKey = this.staffList[i].staffId
         }
       }
@@ -361,19 +369,20 @@ export default {
             if (valid) {
               for (var i = 0; i < this.freightspace.length; i++) {
                 var num = this.freightspace[i].trainNo
-                this.arr.push(
-                  num  
-                )
+                this.arr.push(num)
               }
-              console.log(this.tranCarInfoList.boxNo = this.arr.toString())
               this.deptBudgetList.totalStorage = this.totalStorage
 
               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.sendDateStart =
+                this.deptBudgetList.sendDateStart
+              this.tranCarInfoList.receiveDateEnd =
+                this.deptBudgetList.receiveDateEnd
               this.tranCarInfoList.carModel = this.deptBudgetList.carModel
-              this.tranCarInfoList.tranType= this.tranType
+              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]
@@ -411,6 +420,15 @@ 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,
+              })
+            }
+          }
         })
       //司机姓名下拉
       getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
@@ -418,6 +436,7 @@ export default {
         .then((response) => {
           this.options = response
           this.staffList = response
+          //  this.deptBudgetList.tranCarInfoList.driverPhone = response
         })
       //车型
       packList({ constId: 'TRAN5' })
@@ -807,7 +826,7 @@ export default {
   border-radius: 4px;
   border: 1px solid #d8dce6;
 }
-/deep/.flex .ws-info-table .el-form-item .el-form-item__content{
+/deep/.flex .ws-info-table .el-form-item .el-form-item__content {
   border: 0px;
 }
 //联络员及车次
@@ -815,11 +834,9 @@ export default {
   width: 20%;
 }
 /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
-
   width: 25%;
 }
-/deep/.liaison .flex{
+/deep/.liaison .flex {
   display: contents;
 }
-
 </style>

+ 27 - 149
src/views/tranManagement/tranManagementVehicle.vue

@@ -3,26 +3,11 @@
   <div>
     <BaseHeaderLayout :leftSpan="20">
       <template slot="left">
-        <ws-button
-          class="but"
-          type="primary"
-          @click="handleAdd()"
-          
-        >
+        <ws-button class="but" type="primary" @click="handleAdd()">
           执行中</ws-button
         >
-        <ws-button
-          class="but"
-          @click="handleLook()"
-          
-          >已完成</ws-button
-        >
-        <ws-button
-          class="but"
-          @click="handleEdit()"
-          
-          >全部任务</ws-button
-        >
+        <ws-button class="but" @click="handleLook()">已完成</ws-button>
+        <ws-button class="but" @click="handleEdit()">全部任务</ws-button>
       </template>
       <!-- 接单开始 -->
       <template slot="left">
@@ -48,11 +33,7 @@
           class="findValue"
         ></ws-input>
         <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
-        <ws-button
-          class="find"
-          type="primary"
-          @click="find()"
-          
+        <ws-button class="find" type="primary" @click="find()"
           ><img
             width="16"
             height="16"
@@ -70,74 +51,28 @@
     <div>
       <el-table
         class="wenzi"
-        :data="warehouseList"
+        :data="warehouseList.records"
         style="width: 100%; margin-top: 20px"
         height="780"
       >
         <el-table-column prop="warehouseName" label="序号" width="80">
-        </el-table-column>
-        <el-table-column prop="binNumber" label="运输任务编号" width="80">
-        </el-table-column>
-        <el-table-column prop="capacity" label="货名">
-          <template slot-scope="scope">
-            <div
-              v-if="scope.row.capacity != 'null' && scope.row.capacity != null"
-            >
-              {{ scope.row.capacity }}
-            </div>
+          <template scope="scope">
+            <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+            <span v-else>{{ scope.$index + 1 }}</span>
           </template>
         </el-table-column>
-        <el-table-column class="table_td" label="重量(吨)">
-          <template slot-scope="scope">
-            <div
-              style="height: 24px"
-              v-for="(item, i) in scope.row.warehouseNumViewList"
-            >
-              {{ item.inNetWeight }}
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column class="table_td" label="发货">
-          <template slot-scope="scope">
-            <div
-              style="height: 24px"
-              v-for="(item, i) in scope.row.warehouseNumViewList"
-            >
-              {{ item.outNetWeight }}
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column class="table_td" label="收货">
-          <template slot-scope="scope">
-            <div
-              style="height: 24px"
-              v-for="(item, i) in scope.row.warehouseNumViewList"
-            >
-              {{ item.storage }}
-            </div>
-          </template>
+        <el-table-column prop="processNo" label="运输任务编号" width="120">
         </el-table-column>
+        <el-table-column prop="goodsName" label="货名"> </el-table-column>
+        <el-table-column prop="weight" label="重量(吨)"> </el-table-column>
+        <el-table-column prop="send" label="发货"> </el-table-column>
+        <el-table-column prop="receive" label="收货"> </el-table-column>
         <el-table-column class="table_td" label="运输周期">
           <template slot-scope="scope">
-            <div
-              style="height: 24px"
-              v-for="(item, i) in scope.row.warehouseNumViewList"
-            >
-              {{ item.storage }}
-            </div>
-          </template>
-        </el-table-column>
-        <el-table-column class="table_td" label="签到">
-          <template slot-scope="scope">
-            <div
-              style="height: 24px"
-              v-for="(item, i) in scope.row.warehouseNumViewList"
-            >
-              {{ item.storage }}
-            </div>
+            {{ scope.row.deliveryDateStart }} ~ {{ scope.row.deliveryDateEnd }}
           </template>
         </el-table-column>
-
+        <el-table-column prop="receivingDate" label="签到"> </el-table-column>
         <el-table-column prop="status" label="状态">
           <template slot-scope="scope">
             <el-popover
@@ -192,18 +127,10 @@
         </el-table-column>
         <el-table-column prop="seller" label="操作" width="300">
           <template slot-scope="scope">
-            <ws-button
-              class="completed"
-              @click="nocomplete(scope.row)"
-              
-            >
-              查看({{ scope.row.number }})
+            <ws-button class="completed" @click="nocomplete(scope.row)">
+              查看
             </ws-button>
-            <ws-button
-              class="putstorage"
-              @click="warehousing(scope.row)"
-              
-            >
+            <ws-button class="putstorage" @click="warehousing(scope.row)">
               派车
             </ws-button>
           </template>
@@ -262,6 +189,7 @@ export default {
       submitType: true,
       size: 10,
       spanArr: [],
+      tranTypeKey: '1',
       warehouseName: '',
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
@@ -299,18 +227,10 @@ export default {
     },
     //派车
     warehousing(item) {
-      var free = 0
-      for (var i = 0; i < item.warehouseNumViewList.length; i++) {
-        free += Number(item.warehouseNumViewList[i].storage)
-      }
       this.$router.push({
         path: 'tranManagementVehicleDispatching',
         query: {
-          baseId: item.warehouseId,
-          positionId: item.binNumberId,
-          warehouseName: item.warehouseName,
-          binNumber: item.binNumber,
-          capacity: item.capacity - free,
+          id: item.id,
         },
       })
     },
@@ -349,58 +269,15 @@ export default {
     nocomplete(row) {
       this.$router.push({
         path: 'tranManagementVehicleLook',
-        // query: {
-        //   baseId: row.warehouseId,
-        //   positionId: row.binNumberId,
-        //   warehouseName: row.warehouseName,
-        //   binNumber: row.binNumber,
-        // },
+        query: {
+          id: row.id,
+        },
       })
     },
-    //记录
-    // record(item) {
-    //   this.$router.push({
-    //     name: 'warehouseManagementRecord',
-    //     query: {
-    //       baseId: item.warehouseId,
-    //       positionId: item.binNumberId,
-    //       warehouseName: item.warehouseName,
-    //     },
-    //     params: {
-    //       remark: item.remark,
-    //       binNumber: item.binNumber,
-    //       capacity: item.capacity,
-    //     },
-    //   })
-    // },
-    //盘损
-    // loss(item) {
-    //   this.$router.push({
-    //     path: 'warehouseManagementIoss',
-    //     query: {
-    //       baseId: item.warehouseId,
-    //       positionId: item.binNumberId,
-    //       warehouseName: item.warehouseName,
-    //       binNumber: item.binNumber,
-    //     },
-    //   })
+    // // 派车
+    // warehousing() {
+    //   this.$router.push({ path: 'tranManagementVehicleDispatching' })
     // },
-    //查看
-    handleLook() {
-      this.$router.push({ path: 'tranManagementVehicleLook' })
-    },
-    //添加
-    handleAdd() {
-      this.$router.push({ path: 'tranManagementTransportAdd' })
-    },
-    //编辑
-    handleEdit() {
-      this.$router.push({ path: 'tranManagementTransportEdit' })
-    },
-    // 派车
-    warehousing() {
-      this.$router.push({ path: 'tranManagementVehicleDispatching' })
-    },
     dateFormat(fmt, date) {
       let ret
       const opt = {
@@ -441,6 +318,7 @@ export default {
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         pageSize: this.pageSize,
+        tranTypeKey: this.tranTypeKey,
       })
         .toPromise()
         .then((response) => {

+ 380 - 309
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -22,245 +22,272 @@
       </el-col>
     </el-row>
     <div class="center">
-    <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
-      <div class="basicInformation">
-        <h2> 任务编号 </h2>
-        <ws-info-table>
-          <!-- 任务编号 -->
-          <ws-form-item label="任务编号" span="1" prop="grossWeight">
-            <ws-input
-              @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
-              placeholder="请输入任务编号"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-        <!-- 货名 -->
-          <ws-form-item label="货名" span="1">
-            <ws-input
-              @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
-              placeholder="请输入货名"
-              maxlength="20"
-              size="small"
+      <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
+        <div class="basicInformation">
+          <h2>任务编号</h2>
+          <ws-info-table>
+            <!-- 任务编号 -->
+            <ws-form-item label="任务编号" span="1" prop="processNo">
+              <ws-input
+                :disabled="readonly"
+                v-model="deptBudgetList.processNo"
+                placeholder="请输入任务编号"
+                maxlength="20"
+                size="small"
               />
-          </ws-form-item>
-          <!--重量(吨)-->
-          <ws-form-item
-            label="重量(吨)"
-            span="1"
-            prop="tare"
-            class="readonly"
-          >
-            <ws-input
-              @input="tarechange"
-              v-model="deptBudgetList.tare"
-              placeholder="请输入重重"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+            </ws-form-item>
+            <!-- 货名 -->
+            <ws-form-item label="货名" span="1">
+              <ws-input
+                :disabled="readonly"
+                v-model="deptBudgetList.goodsName"
+                placeholder="请输入货名"
+                maxlength="20"
+                size="small"
+              />
+            </ws-form-item>
+            <!--重量(吨)-->
+            <ws-form-item
+              label="重量(吨)"
+              span="1"
+              prop="tare"
+              class="readonly"
+            >
+              <ws-input
+                :disabled="readonly"
+                v-model="deptBudgetList.weight"
+                placeholder="请输入重重"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
 
-          <!--发货地址-->
-          <ws-form-item label="发货地址" span="1" prop="netWeight">
-            <ws-input
-              readonly="readonly"
-              v-model="deptBudgetList.netWeight"
-              placeholder="不可编辑,自动计算"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-         <!--发货人-->
-          <ws-form-item label="发货人" span="1" prop="agent">
-            <ws-input
-              v-model="deptBudgetList.agent"
-              placeholder="请输入发货人姓名"
-              maxlength="100"
-              size="small"
-          />
-          </ws-form-item>
+            <!--发货地址-->
+            <ws-form-item label="发货地址" span="1" prop="netWeight">
+              {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
+              }}{{ deptBudgetList.sendArea
+              }}{{ deptBudgetList.sendDetailedAddress }}
+            </ws-form-item>
+            <!--发货人-->
+            <ws-form-item label="发货人" span="1" prop="agent">
+              <ws-input
+                :disabled="readonly"
+                v-model="deptBudgetList.sender"
+                placeholder="请输入发货人姓名"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
 
-          <!--发货人电话-->
-          <ws-form-item label="发货人电话" span="1" prop="agent">
-            <ws-input
-              v-model="deptBudgetList.agent"
-              placeholder="请输入发货人电话"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <!--收货地址-->
-          <ws-form-item label="收货地址" span="1" prop="netWeight">
-            <ws-input
-              readonly="readonly"
-              v-model="deptBudgetList.netWeight"
-              placeholder="不可编辑,自动计算"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-         <!--收货人-->
-          <ws-form-item label="收货人" span="1" prop="agent">
-            <ws-input
-              v-model="deptBudgetList.agent"
-              placeholder="请输入发货人"
-              maxlength="100"
-              size="small"
-          />
-          </ws-form-item>
+            <!--发货人电话-->
+            <ws-form-item label="发货人电话" span="1" prop="agent">
+              <ws-input
+                :disabled="readonly"
+                v-model="deptBudgetList.senderPhone"
+                placeholder="请输入发货人电话"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+            <!--收货地址-->
+            <ws-form-item label="收货地址" span="1" prop="netWeight">
+              {{ deptBudgetList.receivePrivate }}{{ deptBudgetList.receiveCity
+              }}{{ deptBudgetList.receiveArea
+              }}{{ deptBudgetList.receiveDetailedAddress }}
+            </ws-form-item>
+            <!--收货人-->
+            <ws-form-item label="收货人" span="1" prop="receiver">
+              <ws-input
+                :disabled="readonly"
+                v-model="deptBudgetList.receiver"
+                placeholder="请输入收货人"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
 
-          <!--收货人电话-->
-          <ws-form-item label="收货人电话" span="1" prop="agent">
-            <ws-input
-              v-model="deptBudgetList.agent"
-              placeholder="请输入收货人电话"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <!--发货日期-->
-          <ws-form-item
-            label="发货日期"
-            span="1"
-            prop="inOutDate"
-            class="deliverydate"
+            <!--收货人电话-->
+            <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
+              <ws-input
+                :disabled="readonly"
+                v-model="deptBudgetList.receiverPhone"
+                placeholder="请输入收货人电话"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+            <!--发货日期-->
+            <ws-form-item
+              label="发货日期"
+              span="1"
+              prop="inOutDate"
+              class="deliverydate"
+            >
+              {{ deptBudgetList.deliveryDateStart }}
+            </ws-form-item>
+            <!--最晚发货日期-->
+            <ws-form-item
+              label="最晚发货日期"
+              span="1"
+              prop="inOutDate"
+              class="deliverydate"
+            >
+              {{ deptBudgetList.deliveryDateEnd }}
+            </ws-form-item>
+            <!--合同编号-->
+            <ws-form-item label="合同编号" span="1" prop="contractNo">
+              <ws-input
+                :disabled="readonly"
+                v-model="deptBudgetList.contractNo"
+                placeholder="请输入合同编号"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+          </ws-info-table>
+
+          <div class="small-title">派车</div>
+
+          <div
+            class="driver position"
+            v-for="(item, index) in deptBudgetList.tranCarInfoList"
           >
-            <ws-date-picker
-              v-model="deptBudgetList.inOutDate"
-              type="date"
-              placeholder="请选择发货日期"
-              value-format="yyyy-MM-dd"
+            <ws-info-table>
+              <!--司机-->
+              <ws-form-item
+                :label="'司机-' + (index + 1)"
+                span="1"
+                prop="driverName"
+                class="siji"
+              >
+                <ws-select
+                  v-model="item.driver"
+                  placeholder="请选择司机"
+                  class="typeselect"
+                  @change="
+                    (val) => {
+                      carchange(val, index)
+                    }
+                  "
+                >
+                  <ws-option
+                    v-for="(items, index) in carList"
+                    :key="index"
+                    :label="items.driverName"
+                    :value="items.driverName"
+                  />
+                </ws-select>
+              </ws-form-item>
+              <!--司机电话-->
+              <ws-form-item
+                label="司机电话"
+                span="1"
+                prop="impurity"
+                class="siji"
+              >
+                <ws-select
+                  v-model="item.driverPhone"
+                  placeholder="请选择司机"
+                  class="typeselect"
+                  @change="
+                    (val) => {
+                      phonechange(val, index)
+                    }
+                  "
+                >
+                  <ws-option
+                    v-for="(items, index) in carList"
+                    :key="index"
+                    :label="items.driverPhone"
+                    :value="items.driverPhone"
+                  />
+                </ws-select>
+              </ws-form-item>
+              <!--车牌号-->
+              <ws-form-item label="车牌号" span="1" prop="carNo" class="siji">
+                <ws-input
+                  :disabled="readonly"
+                  v-model="item.carNo"
+                  placeholder=""
+                  maxlength="120"
+                  size="small"
+                />
+              </ws-form-item>
+              <!--车型-->
+              <ws-form-item label="车型" span="1" prop="carModel" class="siji">
+                <ws-input
+                  :disabled="readonly"
+                  v-model="item.carModel"
+                  placeholder="请输入车型"
+                  maxlength="120"
+                  size="small"
+                />
+              </ws-form-item>
+              <!--车长-->
+              <ws-form-item label="车长" span="1" prop="carLength" class="siji">
+                <ws-input
+                  :disabled="readonly"
+                  v-model="item.carLength"
+                  placeholder="请输入车长"
+                  maxlength="120"
+                  size="small"
+                />
+              </ws-form-item>
+              <!--载重吨-->
+              <ws-form-item
+                label="载重(吨)"
+                span="1"
+                prop="loadWeight"
+                class="siji zaizhong"
+              >
+                <ws-input
+                  :disabled="readonly"
+                  v-model="item.loadWeight"
+                  placeholder="请输入载重(吨)"
+                  maxlength="120"
+                  size="small"
+                />
+              </ws-form-item>
+            </ws-info-table>
+            <img
+              width="22"
+              height="22"
+              class="del"
+              @click="del(index)"
+              src="../../../public/img/del.png"
+              alt=""
             />
-          </ws-form-item>
-           <!--最晚发货日期-->
-          <ws-form-item
-            label="最晚发货日期"
-            span="1"
-            prop="inOutDate"
-            class="deliverydate"
+          </div>
+          <div style="text-align: right">
+            合计{{ total }}/{{ deptBudgetList.weight }}
+          </div>
+          <el-button class="add" type="primary" size="small" @click="add()"
+            >添加司机</el-button
           >
-            <ws-date-picker
-              v-model="deptBudgetList.inOutDate"
-              type="date"
-              placeholder="请选择最晚发货日期"
-              value-format="yyyy-MM-dd"
-            />
-          </ws-form-item>
-          <!--合同编号-->
-          <ws-form-item label="合同编号" span="1" prop="contractNo">
-            <ws-input
-              v-model="deptBudgetList.contractNo"
-              placeholder="请输入合同编号"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          
-        </ws-info-table>
-      
-      <div class="small-title"><h2>派车</h2></div>
-
-     
-        <div
-          style="width: 100%"
-          class="flex position"
-          v-for="(item, index) in freightspace"
-        >
-        <ws-info-table>
-          <!--司机-->
-          <ws-form-item :label="'司机-'+ (index+1)" span="1"  prop="waterContent" class="siji" >
-            <ws-select
-                v-model="deptBudgetList.waterContent"
-                placeholder="请选择司机"
-                @class="typeselect"
-                @change="selectwaterContent"
-            ></ws-select>
-          </ws-form-item>
-          <!--司机电话-->
-          <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" class="siji">
-            <ws-input
-              v-model="deptBudgetList.bulkDensity"
-              placeholder=""
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-          <!--车型-->
-          <ws-form-item label="车型" span="1" prop="mildewGrain" class="siji">
-            <ws-input
-              v-model="deptBudgetList.mildewGrain"
-              placeholder="请输入高栏"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-          <!--车长-->
-          <ws-form-item label="车长" span="1" prop="jiaorenli" class="siji">
-            <ws-input
-              v-model="deptBudgetList.jiaorenli"
-              placeholder="请输入车长"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-          <!--载重吨-->
-          <ws-form-item label="载重(吨)" span="1" prop="imperfectGrain" class="siji zaizhong">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
-              placeholder="请输入载重(吨)"
-              maxlength="120"
+          <div style="text-align: right; padding: 10px">
+            <el-button
+              class="bg-bottom-up"
+              type="primary"
               size="small"
-            />
-            
-          </ws-form-item>
-          
-        </ws-info-table>
-        <img
-            width="22"
-            height="22"
-            class="del"
-            @click="del(index)"
-            src="../../../public/img/del.png"
-            alt=""
-          />
-      </div>
-      
-      <el-button
-          class="add"
-          type="primary"
-          size="small"
-          @click="add()"
-          >添加司机</el-button
-        >
-      <div style="text-align: right; padding: 10px">
-        
-        <el-button
-          class="bg-bottom-up"
-          type="primary"
-          size="small"
-          @click="submit()"
-          >提交</el-button
-        >
-      </div>
-      </div>
-    </ws-form>
+              @click="submit()"
+              >提交</el-button
+            >
+          </div>
+        </div>
+      </ws-form>
     </div>
   </div>
-  
 </template>
 <script>
 import { pullDown, addstorageputList } from '@/model/warehouse/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
+import {
+  seeCat,
+  nameXiala,
+  arrange,
+  dispatchCat,
+} from '@/model/transport/index'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
 import { dayjs, EventBus } from 'base-core-lib'
 export default {
@@ -279,35 +306,20 @@ export default {
   },
   data() {
     return {
-      //弹出框
-      dialogViewSpareMoney: false,
-      dialogApproveFormVisible: false,
-      // 船舶类型
-      monetaryKey: null,
-      // 表格显示数据
-      tableDate: [],
       // 是否显示
       showType: true,
-      // 年
-      year: '',
       deptBudgetTotal: 0,
       currentPage: 1,
       pageSize: 10,
       searchType: 1,
-      searchKeyWord: '',
-      contractType: 2,
       startDate: null,
       endDate: null,
-      goodnameList: {},
+      carList: [],
       // 提交类型
-      submitType: true,
-      storageType: [],
       readonly: true,
       appendixIdsAdd: '',
-      uploadSuccess: {},
       onChange: {},
       gradeList: [],
-       freightspace: [{ binNumber: '', maxStorage: '', remark: '' }],
       rules: {
         netWeight: [
           {
@@ -328,10 +340,9 @@ export default {
       },
       contractList: [],
       deptBudgetList: {
-        warehouseInOutDetail: {},
+        tranCarInfoList: [],
       },
       historyList: [],
-
       pickerBeginDateBefore: {
         disabledDate: (time) => {
           return time.getTime() > Date.now()
@@ -340,40 +351,45 @@ export default {
       accessoryTFs: false,
     }
   },
-  mounted() {
-    this.deptBudgetList.baseId = this.$route.query.baseId
-    this.deptBudgetList.positionId = this.$route.query.positionId
-    this.deptBudgetList.warehouseName = this.$route.query.warehouseName
-    this.deptBudgetList.binNumber = this.$route.query.binNumber
+  activated() {
     this.getList()
-    this.deptBudgetList.goodsName = '玉米'
-    this.deptBudgetList.goodsNameKey = '1'
-    this.deptBudgetList.grade = '一等品'
-    this.deptBudgetList.gradeKey = '1'
-    this.deptBudgetList.inOutType = '采购入库'
-    this.deptBudgetList.inOutTypeKey = '1'
   },
- 
+  computed: {
+    total: function () {
+      var maxStorage = 0
+      for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
+        maxStorage += Number(this.deptBudgetList.tranCarInfoList[i].loadWeight)
+      }
+      return maxStorage
+    },
+  },
   methods: {
     //返回按钮
     revert() {
       this.$router.push({ path: 'tranManagementVehicle' })
     },
-    del(index){
-        if(this.freightspace.length > 1 ){
-            this.freightspace.splice(index,1)
-        }
+    del(index) {
+      if (this.freightspace.length > 1) {
+        this.freightspace.splice(index, 1)
+      }
     },
-      add() {
-      this.freightspace.push({
-        binNumber: '',
-        maxStorage: '',
-        remark: '',
+    add() {
+      this.deptBudgetList.tranCarInfoList.push({
+        driverName: '',
+        driverPhone: '',
+        carLength: 0,
+        carLengthKey: '',
+        loadWeight: null,
+        carModel: '',
+        carModelKey: '',
+        carNumber: '',
+        tranType: '1',
       })
     },
+    selectwaterContent() {},
     //提交按钮
-    submit() { 
-      this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
+    submit() {
+      this.$confirm(`提交成功后,任务将下发给司机,是否确定提交?`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         type: 'warning',
@@ -381,16 +397,15 @@ export default {
         .then(() => {
           this.$refs.deptBudgetList.validate((valid) => {
             if (valid) {
-              this.deptBudgetList.compId = sessionStorage.getItem(
-                'ws-pf_compId'
-              )
-              this.deptBudgetList.inOutFlag = 2
-              this.deptBudgetList.statusFlag = 1
-              addstorageputList(this.deptBudgetList)
+              var tranCarInfo = {}
+              tranCarInfo.id = this.deptBudgetList.id
+              tranCarInfo.infoId = this.deptBudgetList.infoId
+              tranCarInfo.tranCarInfoList = this.deptBudgetList.tranCarInfoList
+              dispatchCat(tranCarInfo)
                 .toPromise()
                 .then((response) => {
-                  this.$message.success('暂存成功')
-                  this.$router.push({ path: 'warehouseManagementList' })
+                  this.$message.success('派车成功')
+                  this.$router.go(-1)
                 })
             } else {
               EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
@@ -402,40 +417,96 @@ export default {
           return false
         })
     },
-   
+
     handleClose() {
       this.accessoryTFs = false
     },
-    handleSizeChange(val) {
-      console.log(`每页 ${val} 条`)
-      this.pageSize = val
-      this.getList()
-    },
-    handleCurrentChange(val) {
-      this.currentPage = val
-      console.log(`当前页: ${val}`)
-      this.getList()
-    },
+
     getList() {
-      // 货名
-      pullDown({ constId: 'CON2' })
+      seeCat({ id: this.$route.query.id })
         .toPromise()
         .then((response) => {
-          this.goodnameList = response
+          this.deptBudgetList = response
+          if (this.deptBudgetList.tranCarInfoList.length == 0) {
+            this.deptBudgetList.tranCarInfoList = [
+              {
+                driverName: '',
+                driverPhone: '',
+                carLength: 0,
+                carLengthKey: '',
+                loadWeight: null,
+                carModel: '',
+                carModelKey: '',
+                carNumber: '',
+                tranType: '1',
+              },
+            ]
+          }
         })
-      // 品级
-      pullDown({ constId: 'CON3' })
+      nameXiala({ compId: this.compId })
         .toPromise()
         .then((response) => {
-          this.gradeList = response
-        })
-      // 类型
-      pullDown({ constId: 'CON5' })
-        .toPromise()
-        .then((response) => {
-          this.storageType = response
+          this.carList = response
         })
     },
+    carchange(val, index) {
+      for (var i = 0; i < this.carList.length; i++) {
+        if (this.carList[i].driverName == val) {
+          this.deptBudgetList.tranCarInfoList[index].driverPhone =
+            this.carList[i].driverPhone
+          arrange({ id: this.carList[i].id })
+            .toPromise()
+            .then((response) => {
+              console.log(this, response)
+              this.deptBudgetList.tranCarInfoList[index].carNo =
+                response.carNumber
+              if (response.carLoad != null) {
+                this.deptBudgetList.tranCarInfoList[index].loadWeight =
+                  response.carLoad
+              } else {
+                this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
+              }
+              this.deptBudgetList.tranCarInfoList[index].carModel =
+                response.carModel
+              this.deptBudgetList.tranCarInfoList[index].carLength =
+                response.carLength
+              this.deptBudgetList.tranCarInfoList[index].carLengthKey =
+                response.carLengthKey
+              this.deptBudgetList.tranCarInfoList[index].carModelKey =
+                response.carModelKey
+            })
+        }
+      }
+    },
+    phonechange(val, index) {
+      for (var i = 0; i < this.carList.length; i++) {
+        if (this.carList[i].driverPhone == val) {
+          this.deptBudgetList.tranCarInfoList[index].driver =
+            this.carList[i].driver
+          arrange({ id: this.carList[i].id })
+            .toPromise()
+            .then((response) => {
+              console.log(this, response)
+              this.deptBudgetList.tranCarInfoList[index].carNo =
+                response.carNumber
+              if (response.carLoad != null) {
+                this.deptBudgetList.tranCarInfoList[index].loadWeight =
+                  response.carLoad
+              } else {
+                this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
+              }
+              this.deptBudgetList.tranCarInfoList[index].carModel =
+                response.carModel
+              this.deptBudgetList.tranCarInfoList[index].carLength =
+                response.carLength
+              this.deptBudgetList.tranCarInfoList[index].carLengthKey =
+                response.carLengthKey
+              this.deptBudgetList.tranCarInfoList[index].carModelKey =
+                response.carModelKey
+            })
+        }
+      }
+    },
     selecttaskType(e) {
       for (var i = 0; i < this.taskTypeList.length; i++) {
         if (this.taskTypeList[i].value == e) {
@@ -506,7 +577,7 @@ export default {
   text-align: right;
   padding: 16px 20px;
 }
-.center{
+.center {
   width: 80%;
   margin: 0 auto;
 }
@@ -536,22 +607,22 @@ export default {
   top: 13px;
   padding: 4px 2px;
 }
-.position{
-  width: 90%;
-}
-.position .siji{
-  width: 15%;
-}
-/deep/.position .ws-info-table .el-form-item .el-form-item__label{
-  width: 40%;
-  text-align: center;
+.position {
+  position: relative;
 }
-.position .zaizhong{
+.position .zaizhong {
   width: 16%;
 }
 //减号
 .del {
-  right: -70px;
+  position: absolute;
+  right: -28px;
+  top: 29%;
+}
+.driver .el-form-item {
+  width: 16.63%;
+}
+/deep/.driver .ws-info-table .el-form-item .el-form-item__label {
+  width: 72px;
 }
-
 </style>

+ 268 - 590
src/views/tranManagement/tranManagementVehicleLook.vue

@@ -22,231 +22,241 @@
       </el-col>
     </el-row>
 
-    <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
-      <div class="basicInformation">
-        <h2>
-           任务编号
-        </h2>
-        <ws-info-table>
-          <!-- 任务编号 -->
-          <ws-form-item label="任务编号" span="1" prop="grossWeight">
-            <ws-input
-              @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
-              placeholder="请输入任务编号"
-              maxlength="20"
-              size="small"
-            />
-          </ws-form-item>
-        <!-- 货名 -->
-          <ws-form-item label="货名" span="1">
-            <ws-input
-              @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
-              placeholder="请输入货名"
-              maxlength="20"
-              size="small"
-              />
-          </ws-form-item>
-          <!--重量(吨)-->
-          <ws-form-item
-            label="重量(吨)"
-            span="1"
-            prop="tare"
-            class="readonly"
+    <ws-form ref="deptBudgetList" :rules="rules" :model="deptBudgetList">
+      <div class="small-title">任务详情</div>
+      <ws-info-table>
+        <!--任务编号-->
+        <ws-form-item label="任务编号" span="1" prop="processNo">
+          <ws-input
+            :disabled="disabled"
+            v-model="deptBudgetList.processNo"
+            placeholder="请输入任务编号"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--货名-->
+        <ws-form-item label="货名" span="1" prop="goodsName">
+          <!-- <el-select
+            v-model="deptBudgetList.goodsName"
+            placeholder="请选择货名"
+            filterable
+            :filter-method="dataFilter"
+            @change="selectstaff"
           >
-            <ws-input
-              @input="tarechange"
-              v-model="deptBudgetList.tare"
-              placeholder="请输入重重"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-
-          <!--发货地址-->
-          <ws-form-item label="发货地址" span="1" prop="netWeight">
-            <ws-input
-              readonly="readonly"
-              v-model="deptBudgetList.netWeight"
-              placeholder="不可编辑,自动计算"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-         <!--发货人-->
-          <ws-form-item label="发货人" span="1" prop="agent">
-            <ws-input
-              v-model="deptBudgetList.agent"
-              placeholder="请输入发货人姓名"
-              maxlength="100"
-              size="small"
+            <el-option
+              v-for="item in personCharge"
+              :key="item.value"
+              :label="item.staffName"
+              :value="item.staffName"
+            /> -->
+          <ws-input
+            :disabled="disabled"
+            v-model="deptBudgetList.goodsName"
+            placeholder="请输入货名"
+            maxlength="20"
+            size="small"
           />
-          </ws-form-item>
+          <!-- </el-select> -->
+        </ws-form-item>
+        <!--重量(吨)-->
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          <ws-input
+            :disabled="disabled"
+            v-model="deptBudgetList.weight"
+            placeholder="请输入重量(吨)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
 
-          <!--发货人电话-->
-          <ws-form-item label="发货人电话" span="1" prop="agent">
-            <ws-input
-              v-model="deptBudgetList.agent"
-              placeholder="请输入发货人电话"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <!--收货地址-->
-          <ws-form-item label="收货地址" span="1" prop="netWeight">
-            <ws-input
-              readonly="readonly"
-              v-model="deptBudgetList.netWeight"
-              placeholder="不可编辑,自动计算"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-         <!--收货人-->
-          <ws-form-item label="收货人" span="1" prop="agent">
-            <ws-input
-              v-model="deptBudgetList.agent"
-              placeholder="请输入发货人"
-              maxlength="100"
-              size="small"
+        <!--发货地址-->
+        <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 }}
+        </ws-form-item>
+
+        <!--发货人-->
+        <ws-form-item label="发货人" span="1" prop="sender" class="readonly">
+          <ws-input
+            :disabled="disabled"
+            v-model="deptBudgetList.sender"
+            placeholder="请输入发货人"
+            maxlength="100"
+            size="small"
           />
-          </ws-form-item>
+        </ws-form-item>
 
-          <!--收货人电话-->
-          <ws-form-item label="收货人电话" span="1" prop="agent">
-            <ws-input
-              v-model="deptBudgetList.agent"
-              placeholder="请输入收货人电话"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          <!--发货日期-->
-          <ws-form-item
-            label="发货日期"
-            span="1"
-            prop="inOutDate"
-            class="deliverydate"
-          >
-            <ws-date-picker
-              v-model="deptBudgetList.inOutDate"
-              type="date"
-              placeholder="请选择发货日期"
-              value-format="yyyy-MM-dd"
-            />
-          </ws-form-item>
-           <!--最晚发货日期-->
-          <ws-form-item
-            label="最晚到货日期"
-            span="1"
-            prop="inOutDate"
-            class="deliverydate"
-          >
-            <ws-date-picker
-              v-model="deptBudgetList.inOutDate"
-              type="date"
-              placeholder="请选择最晚发货日期"
-              value-format="yyyy-MM-dd"
-            />
-          </ws-form-item>
-          <!--合同编号-->
-          <ws-form-item label="合同编号" span="1" prop="contractNo">
-            <ws-input
-              v-model="deptBudgetList.contractNo"
-              placeholder="请输入合同编号"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
-          
-        </ws-info-table>
-      </div>
-      <div class="small-title"><h2>派车</h2></div>
-      <div class="neifor">
+        <!--发货人电话-->
+        <ws-form-item
+          label="发货人电话"
+          span="1"
+          prop="senderPhone"
+          class="readonly"
+        >
+          <ws-input
+            :disabled="disabled"
+            v-model="deptBudgetList.senderPhone"
+            placeholder="请输入发货人电话"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--收货地址-->
+        <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 }}
+        </ws-form-item>
+        <!--收货人-->
+        <ws-form-item label="收货人" span="1" prop="receiver">
+          <ws-input
+            :disabled="disabled"
+            v-model="deptBudgetList.receiver"
+            placeholder="请输入仓库名"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--收货人电话-->
+        <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
+          <ws-input
+            :disabled="disabled"
+            v-model="deptBudgetList.receiverPhone"
+            placeholder="请输入仓库名"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--发货日期-->
+        <ws-form-item label="发货日期" span="1" prop="deliveryDateStart">
+          <ws-input
+            :disabled="disabled"
+            v-model="deptBudgetList.deliveryDateStart"
+            placeholder="请输入仓库名"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--最晚到货日期-->
+        <ws-form-item label="最晚到货日期" span="1" prop="deliveryDateEnd">
+          <ws-input
+            :disabled="disabled"
+            v-model="deptBudgetList.deliveryDateEnd"
+            placeholder="请输入仓库名"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--合同编号-->
+        <ws-form-item label="合同编号" span="1" prop="contractNo">
+          <ws-input
+            :disabled="disabled"
+            v-model="deptBudgetList.contractNo"
+            placeholder="请输入合同编号"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+      </ws-info-table>
+      <div class="small-title">派车</div>
+      <div
+        style="width: 100%"
+        class="driver"
+        v-for="(item, index) in deptBudgetList.tranCarInfoList"
+      >
         <ws-info-table>
-          <!--司机-->
-          <ws-form-item label="司机" span="1" prop="waterContent" class="xia">
+          <span class="not" v-if="item.statusFlag == 3">{{ item.status }}</span>
+          <span class="already" v-if="item.statusFlag == 1">{{
+            item.status
+          }}</span>
+          <!--姓名-->
+          <ws-form-item label="姓名" span="1" prop="driver">
             <ws-input
-              v-model="deptBudgetList.bulkDensity"
-              placeholder=""
-              maxlength="120"
+              :disabled="disabled"
+              v-model="item.driver"
+              placeholder="请输入姓名"
+              maxlength="20"
               size="small"
-              class="aa"
-              
             />
           </ws-form-item>
-          <!--司机电话-->
-          <ws-form-item label="司机电话" span="1" prop="impurity" class="xia">
+          <ws-form-item class="phone" label="电话" span="1" prop="driverPhone">
             <ws-input
-              v-model="deptBudgetList.bulkDensity"
-              placeholder=""
-              maxlength="120"
+              :disabled="disabled"
+              v-model="item.driverPhone"
+              placeholder="请输入电话"
+              maxlength="20"
               size="small"
-              class="aa"
-              
             />
           </ws-form-item>
-          <!--车牌号-->
-          <ws-form-item label="车牌号" span="1" prop="bulkDensity" class="xia">
+          <ws-form-item label="车牌号" span="1" prop="carNo">
             <ws-input
-              v-model="deptBudgetList.bulkDensity"
-              placeholder=""
-              maxlength="120"
+              :disabled="disabled"
+              v-model="item.carNo"
+              placeholder="请输入车牌号"
+              maxlength="20"
               size="small"
-              class="aa"
-              
             />
           </ws-form-item>
-          <!--车型-->
-          <ws-form-item label="车型" span="1" prop="mildewGrain" class="xia">
+          <ws-form-item label="装车(吨)" span="1" prop="loadNetWeight">
             <ws-input
-              v-model="deptBudgetList.mildewGrain"
-              placeholder="请输入高栏"
-              maxlength="120"
+              :disabled="disabled"
+              v-model="deptBudgetList.loadNetWeight"
+              placeholder="未装车"
+              maxlength="20"
               size="small"
-              class="aa"
             />
           </ws-form-item>
-          <!--车长-->
-          <ws-form-item label="车长" span="1" prop="jiaorenli" class="xia">
+          <ws-form-item label="卸车(吨)" span="1" prop="unloadNetWeight">
             <ws-input
-              v-model="deptBudgetList.jiaorenli"
-              placeholder="请输入车长"
-              maxlength="120"
+              :disabled="disabled"
+              v-model="item.unloadNetWeight"
+              placeholder="未卸车"
+              maxlength="20"
               size="small"
-              class="aa"
             />
           </ws-form-item>
-          <!--载重吨-->
-          <ws-form-item label="载重(吨)" span="1" prop="imperfectGrain" class="xia">
+          <ws-form-item label="损耗(吨)" span="1" prop="loss">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
-              placeholder="请输入载重(吨)"
-              maxlength="120"
+              :disabled="disabled"
+              v-model="item.loss"
+              placeholder="未损耗"
+              maxlength="20"
               size="small"
-              class="aa"
             />
           </ws-form-item>
-        </ws-info-table> 
-      </div>
-      <div style="text-align: right; padding: 10px">
-        
-        <el-button
-          class="bg-bottom-up"
-          type="primary"
-          size="small"
-          @click="submit()"
-          >提交</el-button
-        >
+          <ws-form-item label="合同" span="1" prop="unloadNetWeight">
+          </ws-form-item>
+        </ws-info-table>
       </div>
     </ws-form>
+    <div style="text-align: right; padding: 10px">
+      <el-button
+        class="bg-bottom-up"
+        type="primary"
+        size="small"
+        @click="revert()"
+        >关闭</el-button
+      >
+    </div>
   </div>
 </template>
 <script>
 import { pullDown, addstorageputList } from '@/model/warehouse/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
+import { seeCat } from '@/model/transport/index'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
 import { dayjs, EventBus } from 'base-core-lib'
 export default {
@@ -276,6 +286,7 @@ export default {
       showType: true,
       // 年
       year: '',
+      disabled: true,
       deptBudgetTotal: 0,
       currentPage: 1,
       pageSize: 10,
@@ -325,28 +336,8 @@ export default {
       accessoryTFs: false,
     }
   },
-  mounted() {
-    this.deptBudgetList.baseId = this.$route.query.baseId
-    this.deptBudgetList.positionId = this.$route.query.positionId
-    this.deptBudgetList.warehouseName = this.$route.query.warehouseName
-    this.deptBudgetList.binNumber = this.$route.query.binNumber
-    this.getList()
-    this.deptBudgetList.goodsName = '玉米'
-    this.deptBudgetList.goodsNameKey = '1'
-    this.deptBudgetList.grade = '一等品'
-    this.deptBudgetList.gradeKey = '1'
-    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,)
+    this.getList()
   },
   methods: {
     //返回按钮
@@ -358,366 +349,28 @@ 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',
-      })
-        .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
-      }
-      this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning',
-      })
-        .then(() => {
-          this.$refs.deptBudgetList.validate((valid) => {
-            if (valid) {
-              this.deptBudgetList.compId = sessionStorage.getItem(
-                'ws-pf_compId'
-              )
-              this.deptBudgetList.inOutFlag = 2
-              this.deptBudgetList.statusFlag = 1
-              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
-        })
-    },
-    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
-    },
-    handleSizeChange(val) {
-      console.log(`每页 ${val} 条`)
-      this.pageSize = val
-      this.getList()
-    },
-    handleCurrentChange(val) {
-      this.currentPage = val
-      console.log(`当前页: ${val}`)
-      this.getList()
-    },
     getList() {
-      // 货名
-      pullDown({ constId: 'CON2' })
+      seeCat({ id: this.$route.query.id })
         .toPromise()
         .then((response) => {
-          this.goodnameList = response
-        })
-      // 品级
-      pullDown({ constId: 'CON3' })
-        .toPromise()
-        .then((response) => {
-          this.gradeList = response
-        })
-      // 类型
-      pullDown({ constId: 'CON5' })
-        .toPromise()
-        .then((response) => {
-          this.storageType = response
+          for (var i = 0; i < response.tranCarInfoList.length; i++) {
+            if (
+              response.tranCarInfoList[i].loadNetWeight &&
+              response.tranCarInfoList[i].unloadNetWeight
+            ) {
+              response.tranCarInfoList[i].loss =
+                response.tranCarInfoList[i].loadNetWeight -
+                response.tranCarInfoList[i].unloadNetWeight
+            } else if (response.tranCarInfoList[i].loadNetWeight) {
+              response.tranCarInfoList[i].loss =
+                response.tranCarInfoList[i].loadNetWeight
+            } else {
+              response.tranCarInfoList[i].loss = 0
+            }
+          }
+          this.deptBudgetList = response
         })
     },
-    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 ||
-        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',
@@ -794,6 +447,9 @@ export default {
   height: 2000px;
   margin: 0 auto;
 }
+/deep/.ws-info-table .el-form-item {
+  width: 33.33%;
+}
 /deep/.el-form-item__label {
   width: 160px;
 }
@@ -818,32 +474,20 @@ export default {
 }
 //仓位
 
-.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;
-// }
+.position {
+  border-radius: 2px;
+  font-size: 12px;
+  line-height: 20px;
+  display: inline-grid;
+  padding: 2px 4px;
+}
 //表格文字
 /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;
+  color: #000;
   line-height: 16px;
 }
 .small-title {
@@ -871,20 +515,54 @@ padding: 2px 4px;
   width: 35%;
   text-align: center;
 }
-/deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
-  width: 60%;
-  background-color: #f6f7fc;
-}
 
-/deep/.neifor .el-input--small .el-input__inner{
+/deep/.neifor .el-input--small .el-input__inner {
   width: 100%;
 }
 // .ws-info-table[data-v-850a44a6] .el-form-item {
 //     width: 16.66%;
 // }
 .xia {
-   
-    width: 16%;
+  width: 16%;
+}
+//去边框
+/deep/.el-form-item {
+  border-right: 0px;
+  border-bottom: 0px;
+}
+/deep/.ws-info-table {
+  border-left: 0px;
+  border-top: 0px;
+}
+.ws-info-table .el-form-item .el-form-item__content {
+  border-right: 0px;
+  border-bottom: 0px;
+  border-left: 0px;
+  border-top: 0px;
+}
+/deep/.ws-info-table .el-form-item {
+  border-right: 0px;
+  border-bottom: 0px;
+  border-left: 0px;
+  border-top: 0px;
+}
+.driver {
+  position: relative;
+}
+.not,
+.already {
+  position: absolute;
+  left: -45px;
+  top: 10px;
 }
 
+/deep/.driver .ws-info-table .el-form-item {
+  width: 14%;
+}
+/deep/.driver .ws-info-table .el-form-item .el-form-item__label {
+  width: 86px;
+}
+/deep/.driver .ws-info-table .el-form-item.phone .el-form-item__label {
+  width: 50px;
+}
 </style>

+ 35 - 39
src/views/warehouse/warehouseManagementAdd.vue

@@ -29,11 +29,10 @@
       :model="deptBudgetList"
     >
       <el-radio-group v-model="radio">
-        <el-radio :label="1">自有库</el-radio>
-        <el-radio :label="2">临时库</el-radio>
+        <el-radio :label="1">常用仓库</el-radio>
+        <el-radio :label="2">临时库</el-radio>
       </el-radio-group>
-      <!-- <el-radio v-model="radio" label="1" checked="true">自有库</el-radio>
-      <el-radio v-model="radio" label="2">临时库</el-radio> -->
+
       <div class="small-title">基本信息</div>
       <ws-info-table>
         <!--仓库名称-->
@@ -46,22 +45,22 @@
           />
         </ws-form-item>
         <!--负责人-->
-          <ws-form-item label="负责人" span="1" prop="personCharge">
-            <el-select
-              v-model="deptBudgetList.personCharge"
-              placeholder="请选择负责人"
-              filterable
-              :filter-method="dataFilter"
-              @change="selectstaff"
-            >
-              <el-option
-                v-for="item in personCharge"
-                :key="item.value"
-                :label="item.staffName"
-                :value="item.staffName"
-              />
-            </el-select>
-          </ws-form-item>
+        <ws-form-item label="负责人" span="1" prop="personCharge">
+          <el-select
+            v-model="deptBudgetList.personCharge"
+            placeholder="请选择负责人"
+            filterable
+            :filter-method="dataFilter"
+            @change="selectstaff"
+          >
+            <el-option
+              v-for="item in personCharge"
+              :key="item.value"
+              :label="item.staffName"
+              :value="item.staffName"
+            />
+          </el-select>
+        </ws-form-item>
         <!--负责人电话-->
         <ws-form-item label="负责人电话" span="1" prop="personPhone">
           <ws-input
@@ -242,7 +241,7 @@ export default {
       center: [116.244694, 39.517344],
       window: '',
       radio: 1,
-      personCharge:[],
+      personCharge: [],
       polygons: [
         {
           pName: 'Geolocation', //定位
@@ -290,9 +289,9 @@ export default {
       list: [],
     }
   },
-mounted(){
-  this.getList()
-},
+  mounted() {
+    this.getList()
+  },
   computed: {
     totalStorage: function () {
       var maxStorage = 0
@@ -303,7 +302,7 @@ mounted(){
     },
   },
   methods: {
-     dataFilter(val) {
+    dataFilter(val) {
       this.deptBudgetList.personCharge = val
       if (val) {
         console.log(val)
@@ -589,7 +588,6 @@ mounted(){
           type: 'warning',
         })
           .then(() => {
- 
             this.$refs.deptBudgetList.validate((valid) => {
               if (valid) {
                 this.deptBudgetList.compId =
@@ -603,7 +601,7 @@ mounted(){
                 this.deptBudgetList.warehousePositionInfoList =
                   this.freightspace
                 this.deptBudgetList.totalStorage = this.totalStorage
-          
+
                 increase(this.deptBudgetList)
                   .toPromise()
                   .then((response) => {
@@ -671,18 +669,16 @@ mounted(){
     //   let key = this.unitList.find((item) => item.constValue === val).constKey
     //   this.pleaseChoose = val
     // },
-   getList(){
-    
-     getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
-        .toPromise()
-        .then((response) => {
-          // this.agent = response
-//           this.options = response
-//            this.staffList = response
-        this.personCharge = response
-        })
-
-   },
+    getList() {
+      getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
+        .toPromise()
+        .then((response) => {
+          // this.agent = response
+          //           this.options = response
+          //            this.staffList = response
+          this.personCharge = response
+        })
+    },
     handleExamine() {},
     approve() {},
     // returnsales() {

+ 2 - 2
src/views/warehouse/warehouseManagementDelete.vue

@@ -30,8 +30,8 @@
               @change="changeradio"
               size="small"
             >
-              <el-radio-button label="1">自有库</el-radio-button>
-              <el-radio-button label="2">临时库</el-radio-button>
+              <el-radio-button label="1">常用仓库</el-radio-button>
+              <el-radio-button label="2">临时库</el-radio-button>
             </el-radio-group>
           </div>
         </template>

+ 2 - 2
src/views/warehouse/warehouseManagementEdit.vue

@@ -17,8 +17,8 @@
     <div>
       <ws-form ref="deptBudgetList" :model="deptBudgetList">
         <el-radio-group v-model="warehouseType" @change="warehouseTypechange">
-          <el-radio label="1">自有库</el-radio>
-          <el-radio label="2">临时库</el-radio>
+          <el-radio label="1">常用仓库</el-radio>
+          <el-radio label="2">临时库</el-radio>
         </el-radio-group>
         <div class="small-title">基本信息</div>
         <!--基本信息-->

+ 6 - 8
src/views/warehouse/warehouseManagementList.vue

@@ -25,8 +25,8 @@
             @change="changeradio"
             size="small"
           >
-            <el-radio-button label="1">自有库</el-radio-button>
-            <el-radio-button label="2">临时库</el-radio-button>
+            <el-radio-button label="1">常用仓库</el-radio-button>
+            <el-radio-button label="2">临时库</el-radio-button>
           </el-radio-group>
         </div>
       </template>
@@ -152,7 +152,7 @@
         </el-table-column>
         <el-table-column prop="warehouseName" label="仓库名" width="80">
         </el-table-column>
-        <el-table-column prop="address" label="临时库地址">
+        <el-table-column prop="address" label="临时库地址">
           <template slot-scope="scope">
             <div
               v-if="scope.row.address != 'null' && scope.row.address != null"
@@ -340,10 +340,8 @@ export default {
       }
     },
 
-
     //出库
     delivery(item) {
-
       this.$router.push({
         path: 'warehouseManagementDelivery',
         query: {
@@ -353,7 +351,7 @@ export default {
           binNumber: item.binNumber,
           capacity: item.capacity,
           warehouseType: this.warehouseType,
-          warehouseId: item.warehouseId
+          warehouseId: item.warehouseId,
         },
       })
     },
@@ -418,13 +416,13 @@ export default {
             positionId: row.binNumberId,
             warehouseName: row.warehouseName,
             binNumber: row.binNumber,
-             warehouseType: this.warehouseType,
+            warehouseType: this.warehouseType,
           },
         })
       }
     },
     //记录
-    record(item) { 
+    record(item) {
       this.$router.push({
         name: 'warehouseManagementRecord',
         query: {

+ 2 - 2
src/views/warehouse/warehouseManagementLook.vue

@@ -22,8 +22,8 @@
     </el-row>
     <div class="center">
       <el-radio-group v-model="warehouseType" @change="warehouseTypechange">
-        <el-radio label="1">自有库</el-radio>
-        <el-radio label="2">临时库</el-radio>
+        <el-radio label="1">常用仓库</el-radio>
+        <el-radio label="2">临时库</el-radio>
       </el-radio-group>
       <ws-form ref="deptBudgetList" :model="deptBudgetList">
         <div class="small-title">基本信息</div>

+ 8 - 5
src/views/warehouse/warehouseManagementPerfectDelivery.vue

@@ -30,9 +30,7 @@
           <span class="position" v-show="this.$route.query.warehouseType == 1">
             {{ this.deptBudgetList1.binNumber }}仓位
           </span>
-           <span  v-show="this.$route.query.warehouseType == 2">
-             (临)
-          </span>
+          <span v-show="this.$route.query.warehouseType == 2"> (临) </span>
         </h2>
         <div class="small-title">基本信息</div>
         <ws-info-table>
@@ -283,7 +281,12 @@
   </div>
 </template>
 <script>
-import { pullDown, addstorageputList ,xialaNo,getstaff,} from '@/model/warehouse/index'
+import {
+  pullDown,
+  addstorageputList,
+  xialaNo,
+  getstaff,
+} from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -862,7 +865,7 @@ export default {
             this.deliveryType = response
           })
       } else if (this.$route.query.warehouseType == '2') {
-        //临时库出库类型
+        //临时库出库类型
         pullDown({ constId: 'WARE2' })
           .toPromise()
           .then((response) => {

+ 21 - 21
src/views/warehouse/warehouseManagementPerfectput.vue

@@ -26,7 +26,9 @@
       <div class="basicInformation">
         <h2>
           {{ deptBudgetList1.warehouseName }}库
-          <span class="position" v-show="this.$route.query.warehouseType == 1"> {{ deptBudgetList1.binNumber }}仓位 </span>
+          <span class="position" v-show="this.$route.query.warehouseType == 1">
+            {{ deptBudgetList1.binNumber }}仓位
+          </span>
           <span v-show="this.$route.query.warehouseType == 2">(临)</span>
         </h2>
         <div class="small-title">基本信息</div>
@@ -102,7 +104,7 @@
             </ws-select>
           </ws-form-item>
 
-         <!--经办人-->
+          <!--经办人-->
           <ws-form-item label="经办人" span="1" prop="agent">
             <el-select
               v-model="dataList.agent"
@@ -169,25 +171,24 @@
               size="small"
             />
           </ws-form-item> -->
-           <ws-form-item label="合同编号" span="1">
-              <ws-select
-                v-model="dataList.contractNo"
-                placeholder="请选择合同编号"
-                class="typeselect"
-              >
-                <ws-option
-                  v-for="item in outContractNo"
-                  :key="item.constKey"
-                  :label="item.contractNo"
-                  :value="item.contractNo"
-                />
-              </ws-select>
-           </ws-form-item>
+          <ws-form-item label="合同编号" span="1">
+            <ws-select
+              v-model="dataList.contractNo"
+              placeholder="请选择合同编号"
+              class="typeselect"
+            >
+              <ws-option
+                v-for="item in outContractNo"
+                :key="item.constKey"
+                :label="item.contractNo"
+                :value="item.contractNo"
+              />
+            </ws-select>
+          </ws-form-item>
         </ws-info-table>
         <div warehouseType>
           <el-checkbox v-model="checked" checked>退库并出库</el-checkbox>
-          <ws-info-table
-            v-show="checked == true">
+          <ws-info-table v-show="checked == true">
             <!-- 出库类型 -->
             <ws-form-item label="出库类型" span="1">
               <ws-select
@@ -941,14 +942,13 @@ export default {
             this.storageType = response
           })
       } else if (this.$route.query.warehouseType == '2') {
-    
-        //临时库入库类型
+        //临时仓库入库类型
         pullDown({ constId: 'WARE1' })
           .toPromise()
           .then((response) => {
             this.storageType = response
           })
-        //临时库出库类型
+        //临时库出库类型
         pullDown({ constId: 'WARE2' })
           .toPromise()
           .then((response) => {

Some files were not shown because too many files changed in this diff