瀏覽代碼

前端gjy

gjy 4 年之前
父節點
當前提交
532fe8fdee

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

@@ -26,3 +26,12 @@ export const API_GET_PRAAMETER = '/commonSysParameter/getInfo'
 export const API_POST_TRAN_LOOK = '/tranTaskInfo/getTranTask'
 // 汽运调度列表
 export const API_GET_AUTOMOBILE_TRAN_LIST = '/tranProcessInfo/selectTranProcessInfo'
+
+//派车
+export const API_POST_AUTOMOBILE_DISPATCH= "/tranCarInfo/api/insertTranCar"
+//派车查看
+export const API_GET_AUTOMOBILE_SEE = "/tranProcessInfo/getTranProcess"
+//派车查看下拉姓名
+export const API_GET_AUTOMOBILE_NAME = "/driverViewInfo/selectDriverName"
+//派车查看联络员及车次
+export const API_GET_AUTOMOBILE_ARRANGE = "/driverViewInfo/selectDriverDetail"

+ 2 - 0
src/api/V2/warehouse/index.js

@@ -46,6 +46,8 @@ 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_GOODSNAME_XIALA = '/warehouseInOutInfo/selectTemporaryGoodsNameList'

+ 7 - 2
src/lang/zh.js

@@ -519,6 +519,8 @@
     tranManagementVehicleDispatching: '汽车调度',
     tranManagementVehicleLook: '查看派车详情',
     tranManagementTransporTationFire: '火运调度',
+    tranManagementTransporTrainNo: '车次安排',
+    tranManagementTransporTrainDetails: '火运调度详情',
 
     // 采购模块
     procurement: '采购管理',
@@ -4720,7 +4722,8 @@
     tranManagementDriver: '司机管理',
     tranManagementDriverAdd: '添加司机',
     tranManagementDriverLook: '查看司机',
-    tranManagementDriverEdit: '编辑司机'
+    tranManagementDriverEdit: '编辑司机',
+ 
   },
   tranManagementTransport: {
     tranManagementTransport: '运输任务',
@@ -4734,7 +4737,9 @@
     tranManagementVehicleLook: '查看派车详情',
   },
   tranManagementTransporTationFire: {
-    tranManagementTransporTationFire: '火运调度'
+    tranManagementTransporTationFire: '火运调度',
+    tranManagementTransporTrainNo: '车次安排',
+    tranManagementTransporTrainDetails: '火运调度详情',
   },
   // 任务管理
   tranManagement: '任务管理',

+ 1 - 1
src/model/tasksport/index.js

@@ -29,4 +29,4 @@ export const deltran = appRx.post(API_POST_TRAN_DEL, errorCatcher, errorHandle,
 //运输任务-查看
 export const examinetran = appRx.get(API_GET_TRAN_EXAMINE, errorCatcher, errorHandle, filter)
 //运输任务-编辑
-export const edittran = appRx.post(API_GET_TRAN_EDIT, errorCatcher, errorHandle, filter)
+export const edittran = appRx.post(API_GET_TRAN_EDIT, errorCatcher, errorHandle, filter)

+ 15 - 3
src/model/transport/index.js

@@ -14,8 +14,12 @@ import {
     API_POST_EDIT_DRIVER,
     API_GET_PRAAMETER,
     API_POST_TRAN_LOOK,
-    API_GET_AUTOMOBILE_TRAN_LIST
-} from '@/api/V2/taskspost'
+    API_GET_AUTOMOBILE_TRAN_LIST,
+    API_POST_AUTOMOBILE_DISPATCH,
+    API_GET_AUTOMOBILE_SEE,
+    API_GET_AUTOMOBILE_ARRANGE,
+    API_GET_AUTOMOBILE_NAME,
+} from '@/api/V2/transport'
 // 司机列表
 export const selectDriver = appRx.get(API_GET_TRAN_DRIVERINFO, errorCatcher, errorHandle, filter)
 // 添加司机信息
@@ -41,4 +45,12 @@ export const packList = appRx.get(API_GET_PRAAMETER, errorCatcher, errorHandle,
 //运输任务查看
 export const lookTranTask = appRx.get(API_POST_TRAN_LOOK, errorCatcher, errorHandle, filter)
 //汽运调度列表
-export const automobileList = appRx.get(API_GET_AUTOMOBILE_TRAN_LIST, errorCatcher, errorHandle, filter)
+export const automobileList = appRx.get(API_GET_AUTOMOBILE_TRAN_LIST, 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)

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

@@ -23,9 +23,11 @@ import {
     API_POST_WAREHOUSE_CLEARANCEE,
     API_GET_WAREHOUSE_NO,
     API_GET_STAFF,
+    API_GET_WAREHOUSE_RECORDSS,
     API_GET_GOODSNAME_XIALA,
     API_GET_WAREHOUSE_LIST
 } from '@/api/V2/warehouse'
+// import { app } from 'electron'
 // 列表
 export const getList = appRx.get(API_GET_WAREHOUSE_BASEINFO, errorCatcher, errorHandle, filter)
 // 添加
@@ -68,6 +70,8 @@ export const increase = appRx.post(API_POST_WAREHOUSE_ADD, errorCatcher, errorHa
 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 goodsnameXiala = appRx.get(API_GET_GOODSNAME_XIALA, errorCatcher, errorHandle, filter)

+ 33 - 4
src/views/tranManagement/component/routers/route.js

@@ -25,9 +25,41 @@ const tranManagementRouter = {
         permissicon: [],
         keepAlive: true
       },
+    },
+    //车次安排
+    {
+      path: 'tranManagementTransporTrainNo',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementTransporTrainNo'),
+      name: 'tranManagementTransporTrainNo',
+      meta: {
+        title: 'tranManagementTransporTrainNo',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementTransporTrainNo',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
+     //火运调度详情
+     {
+      path: 'tranManagementTransporTrainDetails',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementTransporTrainDetails'),
+      name: 'tranManagementTransporTrainDetails',
+      meta: {
+        title: 'tranManagementTransporTrainDetails',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementTransporTrainDetails',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
+
+
 
 
-    },
     //添加司机
     {
       path: 'tranManagementDriverAdd',
@@ -146,9 +178,6 @@ const tranManagementRouter = {
         keepAlive: true
       }
     },
-
   ],
-
 };
-
 export default tranManagementRouter;

+ 163 - 278
src/views/tranManagement/tranManagementTransporTationFire.vue

@@ -1,20 +1,20 @@
 //火运调度
 <template>
   <div>
-    <BaseHeaderLayout :leftSpan="20">
+    <BaseHeaderLayout :leftSpan="12">
       <template slot="left">
         <ws-button
-        class="but"
+          class="but"
           type="primary"
           @click="handleAdd()"
           v-hasPermission="
             `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
           "
-          >
+        >
           执行中</ws-button
         >
         <ws-button
-        class="but"
+          class="but"
           @click="handleLook()"
           v-hasPermission="
             `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
@@ -22,32 +22,29 @@
           >已完成</ws-button
         >
         <ws-button
-        class="but"
+          class="but"
           @click="handleEdit()"
           v-hasPermission="
             `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
           "
           >全部任务</ws-button
-        > 
-
-
-        
+        >
       </template>
       <!-- 接单开始 -->
       <template slot="left">
-            <ws-date-picker
-              v-model="deptBudgetList.inOutDate"
-              type="date"
-              placeholder="请选择开始日期"
-              value-format="yyyy-MM-dd"
-            />
-            <span>至</span>
-            <ws-date-picker
-              v-model="deptBudgetList.inOutDate"
-              type="date"
-              placeholder="请选择结束日期"
-              value-format="yyyy-MM-dd"
-            />
+        <ws-date-picker
+          v-model="deptBudgetList.inOutDate"
+          type="date"
+          placeholder="请选择开始日期"
+          value-format="yyyy-MM-dd"
+        />
+        <span>至</span>
+        <ws-date-picker
+          v-model="deptBudgetList.inOutDate"
+          type="date"
+          placeholder="请选择结束日期"
+          value-format="yyyy-MM-dd"
+        />
         <ws-input
           v-model="searchKeyWord"
           placeholder="可按照合同编号、买方名称、卖方名称进行查找"
@@ -78,169 +75,112 @@
         /></ws-button>
       </template>
     </BaseHeaderLayout>
-    <div>
+    <div class="container">
       <el-table
         class="wenzi"
-        :data="warehouseList"
+        :data="tranManagementList.records"
         style="width: 100%; margin-top: 20px"
         height="780"
       >
-        <el-table-column prop="warehouseName" label="序号" width="80">
+      <el-table-column type="index" label="序号" width="80" >
+        <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="processNo" label="运输任务编号" width="120">
         </el-table-column>
-        <el-table-column prop="binNumber" label="运输任务编号" width="80">
+           <el-table-column prop="goodsName" 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>
+           <el-table-column prop="weight" label="重量(吨)" width="120">
         </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 prop="send" label="发货" width="160">
         </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="receive" label="收货" width="160">
         </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="tranCycle" label="运输周期" width="120">
         </el-table-column>
-        <el-table-column class="table_td" label="运输周期">
+        <el-table-column prop="status" label="状态">
           <template slot-scope="scope">
-            <div
-              style="height: 24px"
-              v-for="(item, i) in scope.row.warehouseNumViewList"
+            <el-popover
+              placement="left"
+              :width="285"
+              trigger="click"
+              visible-arrow="false"
+              @show="history(scope.row)"
             >
-              {{ item.storage }}
-            </div>
-          </template>
-        </el-table-column>
-        
-
-      <el-table-column prop="status" label="状态">
-        <template slot-scope="scope">
-          <el-popover
-          placement="left"
-          :width="285"
-          trigger="click"
-          visible-arrow="false"
-          @show="history(scope.row)"
-          >
-          <template>
-            <span slot="reference">
-              <span
-              v-if="scope.row.status =='待执行'"
-              class="executory"
-              ></span>
-            <span
-            v-if="scope.row.status == '执行中'"
-            class="inExecution"
-            ></span>
-            <span v-if="scope.row.status == '已完成'" class="done"></span
-            >{{scope.row.status}}
-            </span>
-          </template>
-          <div>
-              <p style="margin-top: 0; padding-left: 10px">XXXXX</p>
-              <div v-for="(item, index) in historyList" class="flex">
-                <div class="vertical-text vertical-text-left">
-                  {{ item.updateDate }}
-                </div>
-                <div>
-                  <div class="vertical-circle"></div>
-                  <div
-                    v-if="index != historyList.length - 1"
-                    class="vertical-line"
-                  ></div>
-                </div>
-                <div class="vertical-text">
-                  {{ item.operateUser }}<br />{{ item.dealMsg }}
+              <template>
+                <span slot="reference">
+                  <span
+                    v-if="scope.row.status == '待执行'"
+                    class="executory"
+                  ></span>
+                  <span
+                    v-if="scope.row.status == '执行中'"
+                    class="inExecution"
+                  ></span>
+                  <span v-if="scope.row.status == '已完成'" class="done"></span
+                  >{{ scope.row.status }}
+                </span>
+              </template>
+              <div>
+                <p style="margin-top: 0; padding-left: 10px">XXXXX</p>
+                <div v-for="(item, index) in historyList" class="flex">
+                  <div class="vertical-text vertical-text-left">
+                    {{ item.updateDate }}
+                  </div>
+                  <div>
+                    <div class="vertical-circle"></div>
+                    <div
+                      v-if="index != historyList.length - 1"
+                      class="vertical-line"
+                    ></div>
+                  </div>
+                  <div class="vertical-text">
+                    {{ item.operateUser }}<br />{{ item.dealMsg }}
+                  </div>
                 </div>
               </div>
-            </div>
-          </el-popover>
-          <img
-            width="17"
-            height="18"
-            style="vertical-align: text-top; position: relative; top: -1px"
-            src="../../../public/img/edit.png"
-            @click="editClick(scope.row)"
-            alt=""
-          />
-        </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>
+            </el-popover>
+            <img
+              width="17"
+              height="18"
+              style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png"
+              @click="editClick(scope.row)"
+              alt=""
+            />
           </template>
         </el-table-column>
+        <el-table-column prop="receivingDate" class="table_td" label="接单日期">
+        </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')}`
-              "
+              @click="trainSee(scope.row)"
+             
             >
-              查看({{ scope.row.number }})
+              查看
             </ws-button>
             <ws-button
               class="putstorage"
-              @click="warehousing(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
+              @click="trainNumber(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 {
-  getList,
-  export1,
-  editstatus,
-  billoperatehis,
-} from '@/model/warehouse/index'
+ automobileList,
+ dispatchCat
+} from '@/model/transport/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -279,6 +219,7 @@ export default {
       searchTypeText: '未完成',
       searchKeyWord: '',
       contractType: 2,
+      tranTypeKey: 2,
       // 提交类型
       submitType: true,
       size: 10,
@@ -286,7 +227,7 @@ export default {
       warehouseName: '',
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
-      warehouseList: [],
+      tranManagementList: [],
       deptBudgetList: {},
       historyList: [],
       pickerBeginDateBefore: {
@@ -305,47 +246,12 @@ export default {
     this.showType = this.isShow
   },
   methods: {
-    //出库
-    delivery(item) {
-      this.$router.push({
-        path: 'warehouseManagementDelivery',
-        query: {
-          baseId: item.warehouseId,
-          positionId: item.binNumberId,
-          warehouseName: item.warehouseName,
-          binNumber: item.binNumber,
-          capacity: item.capacity,
-        },
-      })
-    },
-    //派车
-    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 ,
-        },
-      })
-    },
     getSpanArr(data) {
       let that = this
-
       //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
-
       that.spanArr = []
-
       that.pos = 0
-
       //遍历数据
-
       data.forEach((item, index) => {
         //判断是否是第一项
 
@@ -366,46 +272,25 @@ export default {
         // }
       })
     },
-    //查看//传参
-    nocomplete(row) {
+    //查看火运调度详细
+    trainSee(row) {
       this.$router.push({
-        path: 'tranManagementVehicleLook',
-        // query: {
-        //   baseId: row.warehouseId,
-        //   positionId: row.binNumberId,
-        //   warehouseName: row.warehouseName,
-        //   binNumber: row.binNumber,
-        // },
-      })
-    },
-    //记录
-    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,
-        },
+        path: 'tranManagementTransporTrainDetails',
+        query:{
+          id:row.id
+        }
       })
     },
-    //盘损
-    loss(item) {
+    //车次
+    trainNumber(row) {
       this.$router.push({
-        path: 'warehouseManagementIoss',
-        query: {
-          baseId: item.warehouseId,
-          positionId: item.binNumberId,
-          warehouseName: item.warehouseName,
-          binNumber: item.binNumber,
-        },
+        path: 'tranManagementTransporTrainNo',
+        query:{
+          id : row.id
+        }
       })
     },
+   
     //查看
     handleLook() {
       this.$router.push({ path: 'tranManagementVehicleLook' })
@@ -418,10 +303,7 @@ export default {
     handleEdit() {
       this.$router.push({ path: 'tranManagementTransportEdit' })
     },
-    // 派车
-    warehousing(){
-        this.$router.push({ path: 'tranManagementVehicleDispatching'})
-    },
+
     dateFormat(fmt, date) {
       let ret
       const opt = {
@@ -457,14 +339,17 @@ export default {
       console.log(`当前页: ${val}`)
       this.getList()
     },
-    getList() {
-      getList({
+     getList() {
+      automobileList({
         compId: sessionStorage.getItem('ws-pf_compId'),
-        warehouseName: this.warehouseName,
+        contractType: this.contractType,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        tranTypeKey:this.tranTypeKey
       })
         .toPromise()
         .then((response) => {
-          this.warehouseList = response
+          this.tranManagementList = response
         })
     },
     editClick(row) {
@@ -540,34 +425,34 @@ export default {
       this.currentPage = 1
       this.getList()
     },
-    async exportlist() {
-      const { data } = await export1(
-        {
-          compId: sessionStorage.getItem('ws-pf_compId'),
-          contractType: this.contractType,
-          currentPage: this.currentPage,
-          pageSize: this.pageSize,
-          searchType: this.searchType,
-          searchKeyWord: this.searchKeyWord,
-          startDate: this.startDate,
-          endDate: this.endDate,
-        },
-        {},
-        { responseType: 'blob' }
-      ).toPromise()
-      downloadFile({
-        res: data,
-        fileName: `${
-          this.date.year + (this.date.month ? `-${this.date.month}` : '')
-        }_采购合同`,
-        type: 'xls',
-      })
-    },
+    // async exportlist() {
+    //   const { data } = await export1(
+    //     {
+    //       compId: sessionStorage.getItem('ws-pf_compId'),
+    //       contractType: this.contractType,
+    //       currentPage: this.currentPage,
+    //       pageSize: this.pageSize,
+    //       searchType: this.searchType,
+    //       searchKeyWord: this.searchKeyWord,
+    //       startDate: this.startDate,
+    //       endDate: this.endDate,
+    //     },
+    //     {},
+    //     { responseType: 'blob' }
+    //   ).toPromise()
+    //   downloadFile({
+    //     res: data,
+    //     fileName: `${
+    //       this.date.year + (this.date.month ? `-${this.date.month}` : '')
+    //     }_采购合同`,
+    //     type: 'xls',
+    //   })
+    // },
   },
 }
 </script>
 <style lang="scss" scoped>
-.connert {
+.container {
   width: 90%;
   margin: 0 auto;
 }
@@ -613,37 +498,37 @@ export default {
 /deep/.el-table tr th.is-leaf:first-child {
   border-left: 1px solid #e9ecf7;
 }
-.record,
-.adjustment {
-  display: inline-block;
-  color: #5878e8;
-  padding: 0 4px !important;
-  position: relative;
-}
-.record:after {
-  position: absolute;
-  content: '';
-  display: block;
-  top: 5px;
-  right: -2px;
-  width: 1px;
-  height: 12px;
-  background: #e9ecf7;
-}
-.el-row{
-    height: 150px;
+// .record,
+// .adjustment {
+//   display: inline-block;
+//   color: #5878e8;
+//   padding: 0 4px !important;
+//   position: relative;
+// }
+// .record:after {
+//   position: absolute;
+//   content: '';
+//   display: block;
+//   top: 5px;
+//   right: -2px;
+//   width: 1px;
+//   height: 12px;
+//   background: #e9ecf7;
+// }
+.el-row {
+  height: 150px;
 }
-.base_header_layout .grid-content{
-    margin-top: 80px;
+.base_header_layout .grid-content {
+  margin-top: 80px;
 }
-.but{
-    margin-top: 150px;
+.but {
+  margin-top: 150px;
 }
-.el-input--small .el-input__inner{
-    margin-left: 20px;
+.el-input--small .el-input__inner {
+  margin-left: 20px;
 }
 .el-range-editor--small.el-input__inner {
-    height: 32px;
-    margin-left: -20%;
+  height: 32px;
+  margin-left: -20%;
 }
 </style>

+ 843 - 0
src/views/tranManagement/tranManagementTransporTrainDetails.vue

@@ -0,0 +1,843 @@
+//火运调度详情
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">火运调度详情</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+
+    <ws-form
+      class="position"
+      ref="deptBudgetList"
+      :rules="rules"
+      :model="deptBudgetList"
+    >
+      <div class="small-title">任务详情</div>
+      <ws-info-table>
+        <!--任务编号-->
+        <ws-form-item label="任务编号" span="1" prop="processNo">
+          <ws-input
+            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"
+          >
+            <el-option
+              v-for="item in personCharge"
+              :key="item.value"
+              :label="item.staffName"
+              :value="item.staffName"
+            /> -->
+          <ws-input
+            v-model="deptBudgetList.goodsName"
+            placeholder="请输入货名"
+            maxlength="20"
+            size="small"
+          />
+          <!-- </el-select> -->
+        </ws-form-item>
+        <!--重量(吨)-->
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          <ws-input
+            v-model="deptBudgetList.weight"
+            placeholder="请输入重量(吨)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--发货地址-->
+        <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
+            v-model="deptBudgetList.sender"
+            placeholder="请输入发货人"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--发货人电话-->
+        <ws-form-item
+          label="发货人电话"
+          span="1"
+          prop="senderPhone"
+          class="readonly"
+        >
+          <ws-input
+            v-model="deptBudgetList.senderPhone"
+            placeholder="请输入发货人电话"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--收货地址-->
+        <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
+            v-model="deptBudgetList.receiver"
+            placeholder="请输入仓库名"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--收货人电话-->
+        <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
+          <ws-input
+            v-model="deptBudgetList.receiverPhone"
+            placeholder="请输入仓库名"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--发货日期-->
+        <ws-form-item label="发货日期" span="1" prop="deliveryDateStart">
+          <ws-input
+            v-model="deptBudgetList.deliveryDateStart"
+            placeholder="请输入仓库名"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--最晚到货日期-->
+        <ws-form-item label="最晚到货日期" span="1" prop="deliveryDateEnd">
+          <ws-input
+            v-model="deptBudgetList.deliveryDateEnd"
+            placeholder="请输入仓库名"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--合同编号-->
+        <ws-form-item label="合同编号" span="1" prop="contractNo">
+          <ws-input
+            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="flex position"
+        v-for="(item, index) in freightspace"
+      >
+        <ws-info-table>
+          <!--姓名-->
+          <ws-form-item label="姓名" span="1" prop="driver">
+            <ws-input
+              v-model="deptBudgetList.driver"
+              placeholder="请输入姓名"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!--电话-->
+          <ws-form-item label="电话" span="1" prop="driverPhone">
+            <ws-input
+              v-model="deptBudgetList.driverPhone"
+              placeholder="请输入电话"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发车日期-->
+          <ws-form-item label="发车日期" span="1" prop="sendDateStart">
+            <ws-input
+              v-model="deptBudgetList.sendDateStart"
+              placeholder="请输入发车日期"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!--到站日期-->
+          <ws-form-item label="到站日期" span="1" prop="receiveDateEnd">
+            <ws-input
+              v-model="deptBudgetList.receiveDateEnd"
+              placeholder="请输入到站日期"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!--车次-->
+          <ws-form-item label="车次" span="1" prop="trainNo">
+            <ws-input
+              v-model="deptBudgetList.trainNo"
+              placeholder="请输入车次"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!-- 加减号 -->
+          <img
+            width="22"
+            height="22"
+            class="add"
+            @click="add"
+            src="../../../public/img/add.png"
+            alt=""
+          />
+          <img
+            width="22"
+            height="22"
+            class="del"
+            @click="del(index)"
+            src="../../../public/img/del.png"
+            alt=""
+          />
+        </ws-info-table>
+      </div>
+    </ws-form>
+
+    <!-- 提交 -->
+    <div style="text-align: right; padding: 10px" class="center">
+      <el-button
+        class="bg-bottom"
+        type="primary"
+        size="small"
+        @click="returnsales()"
+        >关闭</el-button
+      >
+    </div>
+  </div>
+</template>
+<script>
+import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
+import { seeCat } from '@/model/transport/index'
+import WsUpload from '@/components/WsUpload'
+import mapDrag from '@/components/mapdrag/mapdrag'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    mapDrag,
+  },
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    let self = this
+    return {
+      staffList: [],
+      deptBudgetList: {
+        totalStorage: 0,
+      },
+      options_: regionData,
+      heightData: '600px',
+      zoom: 7,
+      selectedOptions: [],
+      center: [116.244694, 39.517344],
+      window: '',
+      radio: 1,
+      personCharge: [],
+      district: null,
+      listDate: { country: '中国', level: 'country', city: '' },
+      citylist: [],
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      rules: {
+        warehouseName: [
+          {
+            required: true,
+            message: '请输入仓库名称',
+            trigger: 'blur',
+          },
+          {
+            min: 2,
+            max: 20,
+            message: '仓库名长度不符合要求,请输入2-20字符之内',
+            trigger: 'blur',
+          },
+        ],
+      },
+      appendixIdsAdd: '',
+      size: 10,
+      value1: '',
+      unitList: [],
+      freightspace: [
+        {
+          driver: '',
+          driverPhone: '',
+          sendDateStart: '',
+          receiveDateEnd: '',
+          trainNo: '',
+        },
+      ],
+      name: '',
+      list: [],
+    }
+  },
+  // 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
+    this.getList()
+  },
+  methods: {
+    //联系人下拉搜索
+    // dataFilter(val) {
+    //   this.deptBudgetList.personCharge = val
+    //   if (val) {
+    //     console.log(val)
+    //     this.options = this.staffList.filter((item) => {
+    //       if (
+    //         !!~item.staffName.indexOf(val) ||
+    //         !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+    //       ) {
+    //         return true
+    //       }
+    //     })
+    //   } else {
+    //     this.options = this.staffList
+    //   }
+    // },
+    // selectstaff(e) {
+    //   for (var i = 0; i < this.staffList.length; i++) {
+    //     if (this.staffList[i].staffName == e) {
+    //       this.deptBudgetList.personPhone = 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)
+      }
+    },
+    handleChange(value) {
+      this.selectedOptions = value
+    },
+    returnsales() {
+      this.deptBudgetList = {}
+      this.freightspace = {}
+      this.selectedOptions = ''
+      this.$router.push({ path: 'tranManagementTransporTationFire' })
+    },
+    // confirmPosition() {
+    //   this.draggable = false
+    // },
+    // 上传附件
+    uploadSuccess(data, files, url) {
+      console.log(data, files, url)
+    },
+    // submit() {
+    //   this.$confirm(`确定提交仓库信息?`, {
+    //     confirmButtonText: '确定',
+    //     cancelButtonText: '取消',
+    //     type: 'warning',
+    //   })
+    //     .then(() => {
+    //       this.$refs.deptBudgetList.validate((valid) => {
+    //         if (valid) {
+    //           this.deptBudgetList.compId =
+    //             sessionStorage.getItem('ws-pf_compId')
+    //           this.deptBudgetList.warehousePrivate =
+    //             CodeToText[this.selectedOptions[0]]
+    //           this.deptBudgetList.warehouseCity =
+    //             CodeToText[this.selectedOptions[1]]
+    //           this.deptBudgetList.warehouseArea =
+    //             CodeToText[this.selectedOptions[2]]
+    //           this.deptBudgetList.warehousePositionInfoList = this.freightspace
+    //           this.deptBudgetList.totalStorage = this.totalStorage
+    //           addList(this.deptBudgetList)
+    //             .toPromise()
+    //             .then((response) => {
+    //               this.$message.success('添加成功')
+    //               this.deptBudgetList = {}
+    //               this.freightspace = {}
+    //               this.selectedOptions = ''
+    //               this.$router.push({ path: 'warehouseManagementList' })
+    //             })
+    //         } else {
+    //           // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+    //           return false
+    //         }
+    //       })
+    //     })
+    //     .catch(() => {
+    //       return false
+    //     })
+    // },
+    resetForm(deptBudgetList) {
+      this.$refs[deptBudgetList].resetFields()
+    },
+
+    getList() {
+      seeCat({ id: this.deptBudgetList.id })
+        .toPromise()
+        .then((response) => {
+          this.deptBudgetList = response
+        })
+    },
+    handleExamine() {},
+    approve() {},
+    // returnsales() {
+    //   this.$router.push({ path: 'purchaseContract' })
+    // },
+    selectChapterTwo(e) {
+      for (var i = 0; i < this.ChapterTwoList.length; i++) {
+        if (this.ChapterTwoList[i].constValue == e) {
+          this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
+        }
+      }
+    },
+    selectunitList(e) {
+      for (var i = 0; i < this.unitList.length; i++) {
+        if (this.unitList[i].constValue == e) {
+          this.deptBudgetList.acceptanceMethodKey = this.unitList[i].constKey
+        }
+      }
+    },
+    selectgrade(e) {
+      for (var i = 0; i < this.gradeList.length; i++) {
+        if (this.gradeList[i].constValue == e) {
+          this.deptBudgetList.gradeKey = this.gradeList[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
+        }
+      }
+    },
+    selectpackingMethod(e) {
+      for (var i = 0; i < this.packtypeList.length; i++) {
+        if (this.packtypeList[i].constValue == e) {
+          this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+        }
+      }
+    },
+    // 编辑
+    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)
+      } else {
+        map.flag = 'delete'
+        this.$set(this.unitList, index, map)
+      }
+    },
+    // 删除
+    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 = ''
+        })
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+/deep/.totalStorage .el-input__inner {
+  color: #afb5cb;
+  background: #f5f7fa;
+}
+.small-title {
+  position: relative;
+  padding: 10px;
+  font-weight: 600;
+}
+.small-title::before {
+  position: absolute;
+  content: '';
+  display: block;
+  background: #5473e8;
+  width: 4px;
+  height: 14px;
+  left: 0px;
+  top: 13px;
+}
+.position {
+  position: relative;
+}
+.add,
+.del {
+  position: absolute;
+  right: -38px;
+  top: 9px;
+  cursor: pointer;
+}
+.del {
+  right: -70px;
+}
+.amap-page-container {
+  width: 300px;
+  height: 300px;
+}
+.el-form {
+  padding: 0 15%;
+}
+/deep/.ws-info-table .el-form-item {
+  border-right: 1px solid transparent;
+  border-bottom: 1px solid transparent;
+}
+.readonly {
+  position: relative;
+}
+.readonly:after {
+  content: '*';
+  color: #ff2727;
+  position: absolute;
+  right: 8px;
+  z-index: 10;
+  top: 21%;
+  font-size: 20px;
+}
+.title {
+  position: relative;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+  border-left: 1px solid transparent;
+  background: #fff;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 100px;
+  text-align: center;
+  background: #fff;
+  // border: 1px solid #cdd2dc;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 15px 0px;
+}
+.wenzi {
+  width: 900px;
+  margin: 0 auto;
+}
+.wenzi h3 {
+  display: inline-block;
+  left: 10px;
+}
+.wenzi p {
+  display: inline-block;
+}
+.center {
+  width: 900px;
+  margin: 0 auto;
+}
+.el-form-item {
+  width: 50%;
+}
+.el-form-item__label {
+  text-align: center;
+}
+.ce {
+  width: 900px;
+  margin: 0 auto;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+.winseaview-view {
+  padding: 0 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+.ws-info-table .el-form-item {
+  width: 33.3333%;
+}
+.readonly:after {
+  display: none;
+}
+.el-textarea__inner {
+  display: none;
+}
+.el-form {
+  margin-top: 50px;
+}
+.readonly {
+  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;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  background: #f5f7fa;
+  border-radius: 4px;
+  border: 1px solid #d8dce6;
+  font-family: PingFangSC-Regular, PingFang SC;
+  margin-bottom: 5px;
+  background-color: #fff;
+  font-size: 14px;
+  font-weight: 400;
+  color: #8890b1;
+  line-height: 16px;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  background-color: #fff;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #8890b1;
+  line-height: 16px;
+}
+
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  border: 0px;
+}
+//联络员及车次
+/deep/.flex .ws-info-table .el-form-item {
+  width: 20%;
+}
+/deep/.flex .ws-info-table .el-form-item .el-form-item__label {
+  width: 33%;
+}
+</style>

+ 849 - 0
src/views/tranManagement/tranManagementTransporTrainNo.vue

@@ -0,0 +1,849 @@
+//车次安排
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">车次安排</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+
+    <ws-form
+      class="position"
+      ref="deptBudgetList"
+      :rules="rules"
+      :model="deptBudgetList"
+    >
+      <div class="small-title">任务详情</div>
+      <ws-info-table>
+        <!--任务编号-->
+        <ws-form-item label="任务编号" span="1" prop="processNo">
+          <ws-input
+            v-model="deptBudgetList.processNo"
+            placeholder="请输入任务编号"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--货名-->
+        <ws-form-item label="货名" span="1" prop="goodsName">
+          <ws-select
+            v-model="deptBudgetList.goodsName"
+            placeholder="请选择货名"
+          >
+            <ws-option
+              v-for="item in personCharge"
+              :key="item.value"
+              :label="item.staffName"
+              :value="item.staffName"
+            />
+          </ws-select>
+        </ws-form-item>
+        <!--重量(吨)-->
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          <ws-input
+            v-model="deptBudgetList.weight"
+            placeholder="请输入重量(吨)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--发货地址-->
+        <ws-form-item label="发货地址" span="1" prop="sendDetailedAddress">
+          <el-cascader
+            :options="options_"
+            v-model="deptBudgetList.sendDetailedAddress"
+            clearable
+            size="large"
+            placeholder="请选择发货地址"
+            style="width: 200%"
+            @change="handleChange"
+          />
+        </ws-form-item>
+
+        <!--发货人-->
+        <ws-form-item label="发货人" span="1" prop="sender" class="readonly">
+          <ws-input
+            v-model="deptBudgetList.sender"
+            placeholder="请输入发货人"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--发货人电话-->
+        <ws-form-item
+          label="发货人电话"
+          span="1"
+          prop="senderPhone"
+          class="readonly"
+        >
+          <ws-input
+            v-model="deptBudgetList.senderPhone"
+            placeholder="请输入发货人电话"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--收货地址-->
+        <ws-form-item label="收货地址" span="1" prop="receiveDetailedAddress">
+          <el-cascader
+            :options="options_"
+            v-model="deptBudgetList.receiveDetailedAddress"
+            clearable
+            size="large"
+            placeholder="请选择发货地址"
+            style="width: 200%"
+            @change="handleChange"
+          />
+        </ws-form-item>
+        <!--收货人-->
+        <ws-form-item label="收货人" span="1" prop="receiver">
+          <ws-input
+            v-model="deptBudgetList.receiver"
+            placeholder="请输入仓库名"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--收货人电话-->
+        <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
+          <ws-input
+            v-model="deptBudgetList.receiverPhone"
+            placeholder="请输入仓库名"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--发货日期-->
+        <ws-form-item label="发货日期" span="1" prop="deliveryDateStart">
+          <ws-date-picker
+            v-model="deptBudgetList.deliveryDateStart"
+            type="date"
+            placeholder="请选择发货日期"
+            value-format="yyyy-MM-dd"
+          />
+        </ws-form-item>
+        <!--最晚到货日期-->
+        <ws-form-item label="最晚到货日期" span="1" prop="deliveryDateEnd">
+          <ws-date-picker
+            v-model="deptBudgetList.deliveryDateEnd"
+            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="20"
+            size="small"
+          />
+        </ws-form-item>
+      </ws-info-table>
+      <div class="small-title">联络员及车次</div>
+      <div
+        style="width: 100%"
+        class="flex position"
+        v-for="(item, index) in freightspace"
+      >
+        <ws-info-table>
+          <!--姓名-->
+          <ws-form-item label="姓名" span="1" prop="driver">
+            <!-- <ws-input
+              v-model="deptBudgetList.driver"
+              placeholder="请输入姓名"
+              maxlength="20"
+              size="small"
+            /> -->
+            <ws-select
+              v-model="deptBudgetList.driver"
+              placeholder=""
+              class="typeselect"
+              @change="selectdriver"
+            >
+              <ws-option
+                v-for="item in driverList"
+                :key="item.constKey"
+                :label="item.driverName"
+                :value="item.driverName"
+              />
+            </ws-select>
+          </ws-form-item>
+          <!--电话-->
+          <ws-form-item label="电话" span="1" prop="driverPhone">
+            <ws-input
+              v-model="deptBudgetList.driverPhone"
+              placeholder="请输入电话"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发车日期-->
+          <ws-form-item label="发车日期" span="1" prop="sendDateStart">
+            <ws-date-picker
+              v-model="deptBudgetList.sendDateStart"
+              type="date"
+              placeholder="请选择发货日期"
+              value-format="yyyy-MM-dd"
+            />
+          </ws-form-item>
+          <!--到站日期-->
+          <ws-form-item label="到站日期" span="1" prop="receiveDateEnd">
+            <ws-date-picker
+              v-model="deptBudgetList.receiveDateEnd"
+              type="date"
+              placeholder="请选择发货日期"
+              value-format="yyyy-MM-dd"
+            />
+          </ws-form-item>
+          <!--车次-->
+          <ws-form-item label="车次" span="1" prop="trainNo">
+            <ws-input
+              v-model="deptBudgetList.trainNo"
+              placeholder="请输入车次"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!-- 加减号 -->
+          <img
+            width="22"
+            height="22"
+            class="add"
+            @click="add"
+            src="../../../public/img/add.png"
+            alt=""
+          />
+          <img
+            width="22"
+            height="22"
+            class="del"
+            @click="del(index)"
+            src="../../../public/img/del.png"
+            alt=""
+          />
+        </ws-info-table>
+      </div>
+    </ws-form>
+
+    <!-- 提交 -->
+    <div style="text-align: right; padding: 10px" class="center">
+      <el-button
+        class="bg-bottom"
+        type="primary"
+        size="small"
+        @click="submit(deptBudgetList)"
+        >提交</el-button
+      >
+    </div>
+  </div>
+</template>
+<script>
+import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
+import { seeCat, dispatchCat, arrange, nameXiala } from '@/model/transport/index'
+import WsUpload from '@/components/WsUpload'
+import mapDrag from '@/components/mapdrag/mapdrag'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    mapDrag,
+  },
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      staffList: [],
+      deptBudgetList: {
+        totalStorage: 0,
+      },
+      options_: regionData,
+      heightData: '600px',
+      zoom: 7,
+      selectedOptions: [],
+      center: [116.244694, 39.517344],
+      window: '',
+      radio: 1,
+      personCharge: [],
+      district: null,
+      driverList: [],
+      listDate: { country: '中国', level: 'country', city: '' },
+      citylist: [],
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      rules: {
+        warehouseName: [
+          {
+            required: true,
+            message: '请输入仓库名称',
+            trigger: 'blur',
+          },
+          {
+            min: 2,
+            max: 20,
+            message: '仓库名长度不符合要求,请输入2-20字符之内',
+            trigger: 'blur',
+          },
+        ],
+      },
+      appendixIdsAdd: '',
+      size: 10,
+      value1: '',
+      unitList: [],
+      freightspace: [
+        {
+          driver: '',
+          driverPhone: '',
+          sendDateStart: '',
+          receiveDateEnd: '',
+          trainNo: '',
+        },
+      ],
+      name: '',
+      list: [],
+    }
+  },
+  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: {
+    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
+    },
+    returnsales() {
+      this.deptBudgetList = {}
+      this.freightspace = {}
+      this.selectedOptions = ''
+      this.$router.push({ path: 'tranManagementTransporTationFire' })
+    },
+    // confirmPosition() {
+    //   this.draggable = false
+    // },
+    // 上传附件
+    uploadSuccess(data, files, url) {
+      console.log(data, files, url)
+
+      // this.deptBudgetList.
+      // this.formData.append('files', files)
+      // this.feedbackObj.uploadNameAttachment = data.appendixName
+      // this.feedbackObj.pathUploadAttachment = data.appendixPath
+      // // this.newAppendixs = files
+      // this.onChangeFlag = true
+    },
+    submit() {
+      this.$confirm(`提交成功后,任务将下发给相关人员,是否确定提交?`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            console.log(this.freightspace)
+            if (valid) {
+              this.deptBudgetList.compId =
+                sessionStorage.getItem('ws-pf_compId')
+              this.deptBudgetList.warehousePrivate =
+                CodeToText[this.selectedOptions[0]]
+              this.deptBudgetList.warehouseCity =
+                CodeToText[this.selectedOptions[1]]
+              this.deptBudgetList.warehouseArea =
+                CodeToText[this.selectedOptions[2]]
+              this.deptBudgetList.tranCarInfoList = this.freightspace
+              this.deptBudgetList.totalStorage = this.totalStorage
+              dispatchCat(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('添加成功')
+                  this.deptBudgetList = {}
+                  this.freightspace = {}
+                  this.selectedOptions = ''
+                  this.$router.push({
+                    path: 'tranManagementTransporTationFire',
+                  })
+                })
+            } else {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    resetForm(deptBudgetList) {
+      this.$refs[deptBudgetList].resetFields()
+    },
+
+    getList() {
+      seeCat({ id: this.deptBudgetList.id })
+        .toPromise()
+        .then((response) => {
+          this.deptBudgetList = response
+        })
+      //司机姓名下拉
+      nameXiala({compId: sessionStorage.getItem('ws-pf_compId') })
+        .toPromise()
+        .then((response) => {
+          this.driverList = response
+        })
+    },
+    handleExamine() {},
+    approve() {},
+    // returnsales() {
+    //   this.$router.push({ path: 'purchaseContract' })
+    // },
+    selectChapterTwo(e) {
+      for (var i = 0; i < this.ChapterTwoList.length; i++) {
+        if (this.ChapterTwoList[i].constValue == e) {
+          this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
+        }
+      }
+    },
+    selectunitList(e) {
+      for (var i = 0; i < this.unitList.length; i++) {
+        if (this.unitList[i].constValue == e) {
+          this.deptBudgetList.acceptanceMethodKey = this.unitList[i].constKey
+        }
+      }
+    },
+    selectgrade(e) {
+      for (var i = 0; i < this.gradeList.length; i++) {
+        if (this.gradeList[i].constValue == e) {
+          this.deptBudgetList.gradeKey = this.gradeList[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
+        }
+      }
+    },
+    selectpackingMethod(e) {
+      for (var i = 0; i < this.packtypeList.length; i++) {
+        if (this.packtypeList[i].constValue == e) {
+          this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+        }
+      }
+    },
+    // 编辑
+    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)
+      } else {
+        map.flag = 'delete'
+        this.$set(this.unitList, index, map)
+      }
+    },
+    // 删除
+    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 = ''
+        })
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+/deep/.totalStorage .el-input__inner {
+  color: #afb5cb;
+  background: #f5f7fa;
+}
+.small-title {
+  position: relative;
+  padding: 10px;
+  font-weight: 600;
+}
+.small-title::before {
+  position: absolute;
+  content: '';
+  display: block;
+  background: #5473e8;
+  width: 4px;
+  height: 14px;
+  left: 0px;
+  top: 13px;
+}
+.position {
+  position: relative;
+}
+.add,
+.del {
+  position: absolute;
+  right: -38px;
+  top: 9px;
+  cursor: pointer;
+}
+.del {
+  right: -70px;
+}
+.amap-page-container {
+  width: 300px;
+  height: 300px;
+}
+.el-form {
+  padding: 0 15%;
+}
+/deep/.ws-info-table .el-form-item {
+  border-right: 1px solid transparent;
+  border-bottom: 1px solid transparent;
+}
+.readonly {
+  position: relative;
+}
+.readonly:after {
+  content: '*';
+  color: #ff2727;
+  position: absolute;
+  right: 8px;
+  z-index: 10;
+  top: 21%;
+  font-size: 20px;
+}
+.title {
+  position: relative;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  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;
+}
+.el-col {
+  background: #f6f7fc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+  border-left: 1px solid transparent;
+  background: #fff;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 100px;
+  text-align: center;
+  background: #fff;
+  // border: 1px solid #cdd2dc;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 15px 0px;
+}
+.wenzi {
+  width: 900px;
+  margin: 0 auto;
+}
+.wenzi h3 {
+  display: inline-block;
+  left: 10px;
+}
+.wenzi p {
+  display: inline-block;
+}
+.center {
+  width: 900px;
+  margin: 0 auto;
+}
+.el-form-item {
+  width: 50%;
+}
+.el-form-item__label {
+  text-align: center;
+}
+.ce {
+  width: 900px;
+  margin: 0 auto;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+.winseaview-view {
+  padding: 0 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+.ws-info-table .el-form-item {
+  width: 33.3333%;
+}
+.readonly:after {
+  display: none;
+}
+.el-textarea__inner {
+  display: none;
+}
+.el-form {
+  margin-top: 50px;
+}
+.readonly {
+  width: 16%;
+}
+.ws-info-table .el-form-item {
+  width: 33.33%;
+}
+//去边框
+/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;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  background: #f5f7fa;
+  border-radius: 4px;
+  border: 1px solid #d8dce6;
+  font-family: PingFangSC-Regular, PingFang SC;
+  margin-bottom: 5px;
+  background-color: #fff;
+  font-size: 14px;
+  font-weight: 400;
+  color: #8890b1;
+  line-height: 16px;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  background-color: #fff;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #8890b1;
+  line-height: 16px;
+}
+
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  border: 0px;
+}
+//联络员及车次
+/deep/.flex .ws-info-table .el-form-item {
+  width: 20%;
+}
+/deep/.flex .ws-info-table .el-form-item .el-form-item__label {
+  width: 33%;
+}
+</style>

+ 23 - 130
src/views/tranManagement/tranManagementVehicle.vue

@@ -78,74 +78,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>
-        </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 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.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>
+            {{ scope.row.deliveryDateStart }} ~ {{ scope.row.deliveryDateEnd }}
           </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>
-
+        <el-table-column prop="receivingDate" label="签到"> </el-table-column>
         <el-table-column prop="status" label="状态">
           <template slot-scope="scope">
             <el-popover
@@ -200,22 +154,10 @@
         </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')}`
-              "
-            >
-              查看({{ scope.row.number }})
+            <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="warehousing(scope.row)">
               派车
             </ws-button>
           </template>
@@ -274,6 +216,7 @@ export default {
       submitType: true,
       size: 10,
       spanArr: [],
+      tranTypeKey: '1',
       warehouseName: '',
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
@@ -311,18 +254,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,
         },
       })
     },
@@ -361,58 +296,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 = {
@@ -453,6 +345,7 @@ export default {
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         pageSize: this.pageSize,
+        tranTypeKey: this.tranTypeKey,
       })
         .toPromise()
         .then((response) => {

+ 374 - 308
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -22,245 +22,277 @@
       </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.driverName"
+                  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="carNumber"
+                class="siji"
+              >
+                <ws-input
+                  :disabled="readonly"
+                  v-model="item.carNumber"
+                  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="carLoad"
+                class="siji zaizhong"
+              >
+                <ws-input
+                  :disabled="readonly"
+                  v-model="item.carLoad"
+                  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 +311,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 +345,9 @@ export default {
       },
       contractList: [],
       deptBudgetList: {
-        warehouseInOutDetail: {},
+        tranCarInfoList: [],
       },
       historyList: [],
-
       pickerBeginDateBefore: {
         disabledDate: (time) => {
           return time.getTime() > Date.now()
@@ -340,40 +356,44 @@ 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].carLoad)
+      }
+      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: '',
+        carLoad: null,
+        carModel: '',
+        carModelKey: '',
+        carNumber: '',
       })
     },
+    selectwaterContent() {},
     //提交按钮
-    submit() { 
-      this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
+    submit() {
+      this.$confirm(`提交成功后,任务将下发给司机,是否确定提交?`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         type: 'warning',
@@ -381,16 +401,11 @@ 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)
+              dispatchCat(this.deptBudgetList)
                 .toPromise()
                 .then((response) => {
                   this.$message.success('暂存成功')
-                  this.$router.push({ path: 'warehouseManagementList' })
+                  // this.$router.push({ path: 'warehouseManagementList' })
                 })
             } else {
               EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
@@ -402,40 +417,91 @@ 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: '',
+                carLoad: null,
+                carModel: '',
+                carModelKey: '',
+                carNumber: '',
+              },
+            ]
+          }
         })
-      // 品级
-      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].carNumber =
+                response.carNumber
+              if (response.carLoad != null) {
+                this.deptBudgetList.tranCarInfoList[index].carLoad =
+                  response.carLoad
+              } else {
+                this.deptBudgetList.tranCarInfoList[index].carLoad = 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].driverName =
+            this.carList[i].driverName
+          arrange({ id: this.carList[i].id })
+            .toPromise()
+            .then((response) => {
+              console.log(this, response)
+              this.deptBudgetList.tranCarInfoList[index].carNumber =
+                response.carNumber
+              this.deptBudgetList.tranCarInfoList[index].carLoad =
+                response.carLoad
+              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 +572,7 @@ export default {
   text-align: right;
   padding: 16px 20px;
 }
-.center{
+.center {
   width: 80%;
   margin: 0 auto;
 }
@@ -536,22 +602,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>

+ 245 - 406
src/views/tranManagement/tranManagementVehicleLook.vue

@@ -22,231 +22,232 @@
       </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
+            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
+            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
+            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
+            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
+            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
+            v-model="deptBudgetList.receiver"
+            placeholder="请输入仓库名"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--收货人电话-->
+        <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
+          <ws-input
+            v-model="deptBudgetList.receiverPhone"
+            placeholder="请输入仓库名"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--发货日期-->
+        <ws-form-item label="发货日期" span="1" prop="deliveryDateStart">
+          <ws-input
+            v-model="deptBudgetList.deliveryDateStart"
+            placeholder="请输入仓库名"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--最晚到货日期-->
+        <ws-form-item label="最晚到货日期" span="1" prop="deliveryDateEnd">
+          <ws-input
+            v-model="deptBudgetList.deliveryDateEnd"
+            placeholder="请输入仓库名"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--合同编号-->
+        <ws-form-item label="合同编号" span="1" prop="contractNo">
+          <ws-input
+            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="flex position"
+        v-for="(item, index) in freightspace"
+      >
         <ws-info-table>
-          <!--司机-->
-          <ws-form-item label="司机" span="1" prop="waterContent" class="xia">
-            <ws-input
-              v-model="deptBudgetList.bulkDensity"
-              placeholder=""
-              maxlength="120"
-              size="small"
-              class="aa"
-              
-            />
-          </ws-form-item>
-          <!--司机电话-->
-          <ws-form-item label="司机电话" span="1" prop="impurity" class="xia">
+          <!--姓名-->
+          <ws-form-item label="姓名" span="1" prop="driver">
             <ws-input
-              v-model="deptBudgetList.bulkDensity"
-              placeholder=""
-              maxlength="120"
+              v-model="deptBudgetList.driver"
+              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="driverPhone">
             <ws-input
-              v-model="deptBudgetList.bulkDensity"
-              placeholder=""
-              maxlength="120"
+              v-model="deptBudgetList.driverPhone"
+              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="sendDateStart">
             <ws-input
-              v-model="deptBudgetList.mildewGrain"
-              placeholder="请输入高栏"
-              maxlength="120"
+              v-model="deptBudgetList.sendDateStart"
+              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="receiveDateEnd">
             <ws-input
-              v-model="deptBudgetList.jiaorenli"
-              placeholder="请输入车长"
-              maxlength="120"
+              v-model="deptBudgetList.receiveDateEnd"
+              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="trainNo">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
-              placeholder="请输入载重(吨)"
-              maxlength="120"
+              v-model="deptBudgetList.trainNo"
+              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
-        >
+          <!-- 加减号 -->
+          <img
+            width="22"
+            height="22"
+            class="add"
+            @click="add"
+            src="../../../public/img/add.png"
+            alt=""
+          />
+          <img
+            width="22"
+            height="22"
+            class="del"
+            @click="del(index)"
+            src="../../../public/img/del.png"
+            alt=""
+          />
+        </ws-info-table>
       </div>
     </ws-form>
+    <div style="text-align: right; padding: 10px">
+      <el-button
+        class="bg-bottom-up"
+        type="primary"
+        size="small"
+        @click="submit()"
+        >提交</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 {
@@ -325,28 +326,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,6 +339,13 @@ export default {
         this.freightspace.splice(index, 1)
       }
     },
+    getList() {
+      seeCat({ id: this.$route.query.id })
+        .toPromise()
+        .then((response) => {
+          this.deptBudgetList = response
+        })
+    },
     //提交按钮
     submit() {
       if (!this.deptBudgetList.goodsName) {
@@ -367,8 +355,8 @@ export default {
         })
         return
       }
-      if(!this.deptBudgetList.grossWeight){
-         this.$message({
+      if (!this.deptBudgetList.grossWeight) {
+        this.$message({
           message: '毛重不能为空',
           type: 'warning',
         })
@@ -388,8 +376,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.tare){
-         this.$message({
+      if (!this.deptBudgetList.tare) {
+        this.$message({
           message: '皮重不能为空',
           type: 'warning',
         })
@@ -409,8 +397,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.agent){
-         this.$message({
+      if (!this.deptBudgetList.agent) {
+        this.$message({
           message: '经办人不能为空',
           type: 'warning',
         })
@@ -426,8 +414,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.carNo){
-         this.$message({
+      if (!this.deptBudgetList.carNo) {
+        this.$message({
           message: '车牌号不能为空',
           type: 'warning',
         })
@@ -440,8 +428,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.contractNo){
-         this.$message({
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
           message: '合同编号不能为空',
           type: 'warning',
         })
@@ -458,8 +446,7 @@ export default {
         return
       }
 
-      
-      if(this.deptBudgetList.netWeight > this.$route.query.capacity){
+      if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
         this.$message({
           message: '入库量大于该仓库容量!',
           type: 'warning',
@@ -474,9 +461,8 @@ export default {
         .then(() => {
           this.$refs.deptBudgetList.validate((valid) => {
             if (valid) {
-              this.deptBudgetList.compId = sessionStorage.getItem(
-                'ws-pf_compId'
-              )
+              this.deptBudgetList.compId =
+                sessionStorage.getItem('ws-pf_compId')
               this.deptBudgetList.inOutFlag = 2
               this.deptBudgetList.statusFlag = 3
               addstorageputList(this.deptBudgetList)
@@ -495,140 +481,6 @@ export default {
           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(
@@ -664,39 +516,6 @@ export default {
         }
       }
     },
-    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' })
-        .toPromise()
-        .then((response) => {
-          this.storageType = response
-        })
-    },
     selecttaskType(e) {
       for (var i = 0; i < this.taskTypeList.length; i++) {
         if (this.taskTypeList[i].value == e) {
@@ -794,6 +613,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,14 +640,12 @@ export default {
 }
 //仓位
 
-.position{
-background: #AFB5CB;
-border-radius: 2px;
-font-size: 12px;
-color: #FFFFFF;
-line-height: 20px;
-display: inline-grid;
-padding: 2px 4px;
+.position {
+  border-radius: 2px;
+  font-size: 12px;
+  line-height: 20px;
+  display: inline-grid;
+  padding: 2px 4px;
 }
 // .position {
 //   width: 52px;
@@ -876,15 +696,34 @@ padding: 2px 4px;
   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;
 }
-
 </style>

+ 57 - 17
src/views/warehouse/warehouseManagementAdd.vue

@@ -46,20 +46,22 @@
           />
         </ws-form-item>
         <!--负责人-->
-        <ws-form-item
-          label="负责人"
-          span="1"
-          prop="personCharge"
-          class="readonly"
-        >
-          <ws-input
-            v-model="deptBudgetList.personCharge"
-            placeholder="请输入负责人姓名"
-            maxlength="100"
-            size="small"
-          />
-        </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
@@ -208,6 +210,7 @@ import {
   editxiala,
   delxiala,
   increase,
+  getstaff,
 } from '@/model/warehouse/index'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
@@ -228,6 +231,7 @@ export default {
   data() {
     let self = this
     return {
+      staffList: [],
       deptBudgetList: {
         totalStorage: 0,
       },
@@ -238,6 +242,7 @@ export default {
       center: [116.244694, 39.517344],
       window: '',
       radio: 1,
+      personCharge:[],
       polygons: [
         {
           pName: 'Geolocation', //定位
@@ -285,9 +290,9 @@ export default {
       list: [],
     }
   },
-  activated() {
-    this.loaddata()
-  },
+mounted(){
+  this.getList()
+},
   computed: {
     totalStorage: function () {
       var maxStorage = 0
@@ -298,6 +303,30 @@ export default {
     },
   },
   methods: {
+     dataFilter(val) {
+      this.deptBudgetList.personCharge = val
+      if (val) {
+        console.log(val)
+        this.options = this.staffList.filter((item) => {
+          if (
+            !!~item.staffName.indexOf(val) ||
+            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        this.options = this.staffList
+      }
+    },
+    selectstaff(e) {
+      for (var i = 0; i < this.staffList.length; i++) {
+        if (this.staffList[i].staffName == e) {
+          this.deptBudgetList.personPhone = this.staffList[i].staffMobilePhone
+          this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+        }
+      }
+    },
     marker: function (item) {
       this.deptBudgetList.warehousePositioning =
         item.lnglat.lat + ',' + item.lnglat.lng
@@ -640,7 +669,18 @@ export default {
     //   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
+        })
 
+   },
     handleExamine() {},
     approve() {},
     // returnsales() {

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

@@ -270,7 +270,6 @@ export default {
       showType: true,
       // 年
       year: '',
-      clearancee: {},
       currentPage: 1,
       pageSize: 10,
       searchType: 1,
@@ -425,7 +424,7 @@ export default {
       }
     },
     //记录
-    record(item) {
+    record(item) { 
       this.$router.push({
         name: 'warehouseManagementRecord',
         query: {
@@ -435,6 +434,7 @@ export default {
           remark: item.remark,
           binNumber: item.binNumber,
           capacity: item.capacity,
+          warehouseType: this.warehouseType,
         },
       })
     },

+ 177 - 30
src/views/warehouse/warehouseManagementRecord.vue

@@ -31,7 +31,8 @@
           alt=""
         />
         <span style="color: #323233">{{ deptBudgetList.warehouseName }}</span>
-        <span class="ware">{{binNumber}}仓位(容量{{capacity}}吨)</span>
+        <span class="ware" v-show="warehouseType==1">{{binNumber}}仓位(容量{{capacity}}吨)</span>
+        <span v-show="warehouseType==2">(临)</span>
       </h2>
       <p
         style="
@@ -105,7 +106,7 @@
             alt=""
           />入库记录
         </div>
-        <el-table :data="warehouseList.records" height="560">
+        <el-table :data="warehouseList.records" height="560" v-show="this.warehouseType== '1'">
           <el-table-column type="expand">
             <template #default="props">
               <ws-form ref="deptBudgetList" :model="deptBudgetList">
@@ -129,7 +130,7 @@
                     label="不完善粒(%)<="
                     span="1"
                     prop="imperfectGrain"
-                  >
+                  >        
                     {{ props.row.imperfectGrain }}
                   </ws-form-item>
                   <ws-form-item label="质检员" span="1" prop="qualityInspector">
@@ -200,9 +201,117 @@
                 @click="fujian(scope.row)"
                 alt=""
               />
-              <span v-if="scope.row.addressUrlArray.length > 0">{{
+              <!-- <span v-if="scope.row.addressUrlArray.length > 0">{{
                 scope.row.addressUrlArray.length
+              }}</span> -->
+              <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
+            </template>
+          </el-table-column>
+          <el-table-column prop="createDate" label="录入时间">
+            <template slot-scope="scope">
+              <span style="color: #8890b1">{{ scope.row.createDate }}</span>
+            </template>
+          </el-table-column>
+          
+        </el-table>
+        <el-table :data="warehouseList.records" height="560" v-show="this.warehouseType== '2'">
+          <el-table-column type="expand">
+            <template #default="props">
+              <ws-form ref="deptBudgetList" :model="deptBudgetList">
+                <ws-info-table>
+                  <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
+                    {{ props.row.waterContent }}
+                  </ws-form-item>
+                  <ws-form-item label="容重(%)<=" span="1" prop="bulkDensity">
+                    {{ props.row.bulkDensity }}
+                  </ws-form-item>
+                  <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+                    {{ props.row.jiaorenli }}
+                  </ws-form-item>
+                  <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+                    {{ props.row.impurity }}
+                  </ws-form-item>
+                  <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
+                    {{ props.row.mildewGrain }}
+                  </ws-form-item>
+                  <ws-form-item
+                    label="不完善粒(%)<="
+                    span="1"
+                    prop="imperfectGrain"
+                  >
+                    {{ props.row.imperfectGrain }}
+                  </ws-form-item>
+                  <ws-form-item label="质检员" span="1" prop="qualityInspector">
+                    {{ props.row.qualityInspector }}
+                  </ws-form-item>
+                </ws-info-table>
+              </ws-form>
+            </template>
+          </el-table-column>
+          <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="goodsName" label="货名"> </el-table-column>
+          <el-table-column
+            prop="grossWeight"
+            label="毛重(吨)"
+          ></el-table-column>
+          <el-table-column prop="tare" label="皮重(吨)"> </el-table-column>
+          <el-table-column
+            prop="netWeight"
+            label="净重(吨)"
+          ></el-table-column>
+          <el-table-column prop="grade" label="品级">
+            <template slot-scope="scope">
+              <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
+                scope.row.grade
+              }}</span>
+              <span v-if="scope.row.grade == '二等品'" class="second-class">{{
+                scope.row.grade
+              }}</span>
+              <span v-if="scope.row.grade == '三等品'" class="third-class">{{
+                scope.row.grade
+              }}</span>
+              <span v-if="scope.row.grade == '等外'" class="substandard">{{
+                scope.row.grade
               }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="inOutDate" label="出入库日期">
+            <template slot-scope="scope">
+              <span style="color: #8890b1">{{ scope.row.inOutDate }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="inOutType" label="类型"> </el-table-column>
+          <el-table-column prop="contractNo" label="合同编号">
+            <template slot-scope="scope">
+              <span style="color: #8890b1">{{ scope.row.contractNo }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="carNo" label="车牌号">
+            <template slot-scope="scope">
+              <span style="color: #8890b1">{{ scope.row.carNo }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="agent" label="经办人">
+          </el-table-column>
+          <el-table-column prop="buyer" label="内勤"> </el-table-column>
+          <el-table-column prop="addressUrl" label="附件">
+            <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=""
+              />
+              <!-- <span v-if="scope.row.addressUrlArray.length > 0">{{
+                scope.row.addressUrlArray.length
+              }}</span> -->
               <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
             </template>
           </el-table-column>
@@ -211,7 +320,9 @@
               <span style="color: #8890b1">{{ scope.row.createDate }}</span>
             </template>
           </el-table-column>
+          
         </el-table>
+        
         <div style="text-align: center; padding: 10px">
           <el-pagination
             @size-change="handleSizeChange"
@@ -244,9 +355,12 @@
       />
     </WinseaContentModal>
   </div>
+  
 </template>
+
+
 <script>
-import { addselectinfoList } from '@/model/warehouse/index'
+import { addselectinfoList,recordss } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -295,6 +409,7 @@ export default {
       submitType: true,
       selectpackingMethod: {},
       size: 10,
+      warehouseType:'1',
      deptBudgetList1: {},
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
@@ -326,10 +441,13 @@ export default {
     this.remark = this.$route.query.remark
     this.binNumber = this.$route.query.binNumber
     this.capacity = this.$route.query.capacity
+    this.warehouseType = this.$route.query.warehouseType
     this.getList()
+
     this.showType = this.isShow
   },
   methods: {
+  
     //返回按钮
     returnWarehouse() {
       this.$router.push({ path: 'warehouseManagementList' })
@@ -398,7 +516,8 @@ export default {
       // this.onChangeFlag = true
     },
     getList() {
-      addselectinfoList({
+      if(this.warehouseType==1){
+        addselectinfoList({
         compId: sessionStorage.getItem('ws-pf_compId'),
         baseId: this.deptBudgetList.baseId,
         positionId: this.deptBudgetList.positionId,
@@ -422,7 +541,35 @@ export default {
           this.deptCircularPage.pageSize = response.size
           this.deptBudgetTotal = response.total
           this.warehouseList = response
-        })
+        }) 
+      }else if(this.warehouseType==2){
+       recordss({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        baseId: this.deptBudgetList.baseId,
+        positionId: this.deptBudgetList.positionId,
+        warehouseName: this.deptBudgetList.warehouseName,
+        searchType: this.searchType,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+      })
+        .toPromise()
+        .then((response) => {
+          for (var i = 0; i < response.records.length; i++) {
+            if (response.records[i].addressUrl != null) {
+              response.records[i].addressUrlArray = response.records[
+                i
+              ].addressUrl.split(',')
+            } else {
+              response.records[i].addressUrlArray = []
+            }
+          }
+         this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
+          this.warehouseList = response
+        }) 
+      }
+      
     },
     selecttaskType(e) {
       for (var i = 0; i < this.taskTypeList.length; i++) {
@@ -470,29 +617,29 @@ export default {
       this.currentPage = 1
       this.getList()
     },
-    async exportlist() {
-      const { data } = await export1(
-        {
-          compId: sessionStorage.getItem('ws-pf_compId'),
-          contractType: this.contractType,
-          currentPage: this.currentPage,
-          pageSize: this.pageSize,
-          searchType: this.searchType,
-          searchKeyWord: this.searchKeyWord,
-          startDate: this.startDate,
-          endDate: this.endDate,
-        },
-        {},
-        { responseType: 'blob' }
-      ).toPromise()
-      downloadFile({
-        res: data,
-        fileName: `${
-          this.date.year + (this.date.month ? `-${this.date.month}` : '')
-        }_采购合同`,
-        type: 'xls',
-      })
-    },
+    // async exportlist() {
+    //   const { data } = await export1(
+    //     {
+    //       compId: sessionStorage.getItem('ws-pf_compId'),
+    //       contractType: this.contractType,
+    //       currentPage: this.currentPage,
+    //       pageSize: this.pageSize,
+    //       searchType: this.searchType,
+    //       searchKeyWord: this.searchKeyWord,
+    //       startDate: this.startDate,
+    //       endDate: this.endDate,
+    //     },
+    //     {},
+    //     { responseType: 'blob' }
+    //   ).toPromise()
+    //   downloadFile({
+    //     res: data,
+    //     fileName: `${
+    //       this.date.year + (this.date.month ? `-${this.date.month}` : '')
+    //     }_采购合同`,
+    //     type: 'xls',
+    //   })
+    // },
     // deletecontract(){},
     //删除