Преглед на файлове

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

zhongtianhaoyuan преди 4 години
родител
ревизия
45a08ff417

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

@@ -1,2 +1,8 @@
+// 司机列表
 export const API_GET_TRAN_DRIVERINFO = '/driverViewInfo/selectDriverInfoPage'
-export const API_POST_TRAN_DRIVERINFOADD = '/driverViewInfo/api/addInfo'
+// 司机管理添加
+export const API_POST_TRAN_DRIVERINFOADD = '/driverViewInfo/api/addInfo'
+// 司机管理查看
+export const API_GET_DRIVERINFO_GETDRIVER = '/driverViewInfo/getDriver'
+// 司机管理-删除
+export const API_POST_DELETE_DRIVER = '/driverViewInfo/api/deleteDriver'

+ 1 - 1
src/components/WsUpload/index.vue

@@ -25,7 +25,7 @@
       </div>
     </div>
     <el-upload
-      action="#"
+      action="https://www.zthymaoyi.com/upload/admin"
       list-type="picture-card"
       :http-request="_handleRequest"
       :file-list="fileList"

+ 38 - 40
src/lang/zh.js

@@ -229,7 +229,7 @@
     voyagePlanAdd: '制定航次计划',
     voyagePlanView: '航行计划',
     voyagePlanList: '航行计划',
-    
+
     // 首页
     home: '首页',
     // 工作通知
@@ -489,24 +489,25 @@
     purchaseContractAdd: '采购合同添加',
     purchaseContractEdit: '采购合同编辑',
     //仓库管理、
-    warehouseManagementList:'仓库管理',
-    warehouseManagementAdd:'仓库管理添加',
-    warehouseManagementEdit:'仓库管理编辑',
-    warehouseManagementPut:'入库',
-    warehouseManagementDelivery:'出库',
-    warehouseManagementIossRecord:'盘损详情',
-    warehouseManagementLook:'仓库管理查看',
-    warehouseManagementDelete:'仓库管理删除',
-    warehouseManagementIoss:'仓库管理盘损',
-    warehouseManagementRecord:'记录',
-    warehouseManagementNoComplete:'待完成',
-    warehouseManagementPerfectput:'编辑',
+    warehouseManagementList: '仓库管理',
+    warehouseManagementAdd: '仓库管理添加',
+    warehouseManagementEdit: '仓库管理编辑',
+    warehouseManagementPut: '入库',
+    warehouseManagementDelivery: '出库',
+    warehouseManagementIossRecord: '盘损详情',
+    warehouseManagementLook: '仓库管理查看',
+    warehouseManagementDelete: '仓库管理删除',
+    warehouseManagementIoss: '仓库管理盘损',
+    warehouseManagementRecord: '记录',
+    warehouseManagementNoComplete: '待完成',
+    warehouseManagementPerfectput: '编辑',
     //运输管理
     tranManagement: '运输管理',
-    tranManagementDriver:'司机管理',
-    tranManagementDriverAdd:'添加司机',
-    warehouseManagementPerfectDelivery:'编辑',
-    tranManagementTransport:'运输任务',
+    tranManagementDriver: '司机管理',
+    tranManagementDriverAdd: '添加司机',
+    tranManagementDriverLook: '查看司机',
+    warehouseManagementPerfectDelivery: '编辑',
+    tranManagementTransport: '运输任务',
 
     // 采购模块
     procurement: '采购管理',
@@ -4674,7 +4675,7 @@
   },
   //合同管理
   sales: {
-     salesContract: '销售合同',
+    salesContract: '销售合同',
     salesContractEdit: '销售合同编辑',
     salesContractExamine: '销售合同查看',
     purchaseContractExamine: '采购合同查看',
@@ -4687,31 +4688,28 @@
     purchaseContract: '采购合同',
   },
   //仓库管理
-  warehouseManagement:{
-    warehouseManagementList:'仓库管理',
-    warehouseManagementAdd:'仓库管理添加',
-    warehouseManagementEdit:'仓库管理编辑',
-    warehouseManagementPut:'入库',
-    warehouseManagementDelivery:'出库',
-    warehouseManagementLook:'仓库管理查看',
-    warehouseManagementDelete:'仓库管理删除',
-    warehouseManagementIoss:'仓库管理盘损',
-    warehouseManagementIossRecord:'盘损详情',
-    warehouseManagementRecord:'记录',
-    warehouseManagementNoComplete:'待完成',
-    warehouseManagementPerfectput:'编辑',
-    warehouseManagementPerfectDelivery:'编辑',
+  warehouseManagement: {
+    warehouseManagementList: '仓库管理',
+    warehouseManagementAdd: '仓库管理添加',
+    warehouseManagementEdit: '仓库管理编辑',
+    warehouseManagementPut: '入库',
+    warehouseManagementDelivery: '出库',
+    warehouseManagementLook: '仓库管理查看',
+    warehouseManagementDelete: '仓库管理删除',
+    warehouseManagementIoss: '仓库管理盘损',
+    warehouseManagementIossRecord: '盘损详情',
+    warehouseManagementRecord: '记录',
+    warehouseManagementNoComplete: '待完成',
+    warehouseManagementPerfectput: '编辑',
+    warehouseManagementPerfectDelivery: '编辑',
 
   },
   //运输管理
-  tranManagement:{
-    tranManagementDriver:'司机管理',
-    tranManagementDriverAdd:'添加司机',
-   
-    
-  },
-  tranManagementTransport:{
-    tranManagementTransport:'运输任务',
+  tranManagement: {
+    tranManagementDriver: '司机管理',
+    tranManagementDriverAdd: '添加司机',
+    tranManagementDriverLook: '查看司机',
+    tranManagementTransport: '运输任务',
   },
   // 年度培训
   annualTraining: {

+ 8 - 2
src/model/transport/index.js

@@ -3,9 +3,15 @@ import { appRx } from '../defalutConfig/indexRx'
 
 import {
     API_GET_TRAN_DRIVERINFO,
-    API_POST_TRAN_DRIVERINFOADD
+    API_POST_TRAN_DRIVERINFOADD,
+    API_GET_DRIVERINFO_GETDRIVER,
+    API_POST_DELETE_DRIVER
 } from '@/api/V2/transport'
 // 司机列表
 export const selectDriver = appRx.get(API_GET_TRAN_DRIVERINFO, errorCatcher, errorHandle, filter)
 // 添加司机信息
-export const addDriver = appRx.post(API_POST_TRAN_DRIVERINFOADD, errorCatcher, errorHandle, filter)
+export const addDriver = appRx.post(API_POST_TRAN_DRIVERINFOADD, errorCatcher, errorHandle, filter)
+// 司机管理-查看
+export const lookDriver = appRx.get(API_GET_DRIVERINFO_GETDRIVER, errorCatcher, errorHandle, filter)
+// 司机管理-删除
+export const delDriver = appRx.post(API_POST_DELETE_DRIVER, errorCatcher, errorHandle, filter)

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

@@ -419,6 +419,7 @@ export default {
       }
       return fmt
     },
+
     handleClose() {
       this.accessoryTFs = false
     },

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

@@ -12,7 +12,7 @@ const tranManagementRouter = {
     icon: 'cg'
   },
   children: [
-      //司机管理
+    //司机管理
     {
       path: 'tranManagementDriver',
       component: () =>
@@ -55,9 +55,22 @@ const tranManagementRouter = {
       },
       hidden: true
     },
-    
-    
-    
+    //查看司机
+    {
+      path: 'tranManagementDriverLook',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementDriverLook'),
+      name: 'tranManagementDriverLook',
+      meta: {
+        title: 'tranManagementDriverLook',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementDriverLook',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
+
   ],
 
 };

+ 200 - 64
src/views/tranManagement/tranManagementDriver.vue

@@ -59,8 +59,64 @@
         :data="driverList.records"
         style="width: 100%; margin-top: 20px"
         fit
+        ref="expandstable"
+        :expand-row-keys="expands"
+        :row-key="getRowKeys"
         height="780"
       >
+        <el-table-column type="expand">
+          <template slot-scope="props">
+            <ws-form>
+              <div v-for="item in props.row.driverPayeeInfoList">
+                <ws-info-table>
+                  <ws-form-item
+                    v-if="item.accountTypeFlag == 1"
+                    label="收款人"
+                    span="1"
+                    prop="payeeName"
+                    class="el-car"
+                  >
+                    {{ item.payeeName }}
+                  </ws-form-item>
+                  <ws-form-item
+                    v-if="item.accountTypeFlag == 1"
+                    label="企业名称"
+                    span="1"
+                    prop="bankDeposit"
+                    class="el-car"
+                  >
+                    {{ item.payeeNumberCard }}
+                  </ws-form-item>
+                  <ws-form-item
+                    v-if="item.accountTypeFlag == 2"
+                    label="身份证"
+                    span="1"
+                    prop="bankDeposit"
+                    class="el-car"
+                  >
+                    {{ item.compName }}
+                  </ws-form-item>
+                  <ws-form-item
+                    label="开户行"
+                    span="1"
+                    prop="bankDeposit"
+                    class="el-car"
+                  >
+                    {{ item.bankDeposit }}
+                  </ws-form-item>
+                  <ws-form-item
+                    label="账号"
+                    span="1"
+                    prop="bankDeposit"
+                    class="el-car"
+                  >
+                    {{ item.bankCard }}
+                  </ws-form-item>
+                </ws-info-table>
+              </div>
+            </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>
@@ -73,7 +129,22 @@
         </el-table-column>
         <el-table-column prop="driverPhone" label="手机号" width="120">
         </el-table-column>
-        <el-table-column prop="carNumber" label="车牌号" width="80">
+        <el-table-column prop="carNumber" label="车牌号" width="120">
+          <template scope="scope">
+            <ws-select
+              v-model="scope.row.carNumber"
+              placeholder=""
+              class="typeselect"
+              @change="selectcar($event, scope.row)"
+            >
+              <ws-option
+                v-for="item in scope.row.driverCarInfoList"
+                :key="item.constKey"
+                :label="item.carNumber"
+                :value="item.carNumber"
+              />
+            </ws-select>
+          </template>
         </el-table-column>
         <el-table-column prop="binNumber" label="常驻城市" width="120">
         </el-table-column>
@@ -81,6 +152,26 @@
         </el-table-column>
         <el-table-column prop="carLength" label="车长" width="80">
         </el-table-column>
+        <el-table-column label="结款账户" width="120">
+          <template slot-scope="scope">
+            <el-button
+              v-if="!scope.row.expandsStatus"
+              size="medium"
+              type="text"
+              class="fs-16"
+              @click="expandsHandle(scope.row)"
+              >展开</el-button
+            >
+            <el-button
+              v-if="scope.row.expandsStatus"
+              size="medium"
+              type="text"
+              class="fs-16"
+              @click="expandsHandle(scope.row)"
+              >收起</el-button
+            >
+          </template>
+        </el-table-column>
         <el-table-column prop="addressUrl" label="附件">
           <!-- <template slot-scope="scope">
             <img
@@ -96,40 +187,41 @@
             }}</span>
           </template> -->
         </el-table-column>
-        <el-table-column prop="address" label="操作" width="200">
-          <ws-button
-            type="primary"
-            @click="look()"
-            v-hasPermission="
-              `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-            "
-            >查看</ws-button
-          >
-          <ws-button
-            type="primary"
-            @click="edit()"
-            v-hasPermission="
-              `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-            "
-            >编辑</ws-button
-          >
-          <ws-button
-            type="primary"
-            @click="deletes()"
-            v-hasPermission="
-              `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-            "
-            >删除</ws-button
-          >
-          <ws-button
-            type="primary"
-            @click="stop()"
-            v-hasPermission="
-              `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-            "
-            >禁用</ws-button
-          >
-          <!-- </template> -->
+        <el-table-column prop="address" label="操作" width="400">
+          <template slot-scope="scope">
+            <ws-button
+              type="primary"
+              @click="look(scope.row)"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              >查看</ws-button
+            >
+            <ws-button
+              type="primary"
+              @click="edit(scope.row)"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              >编辑</ws-button
+            >
+            <ws-button
+              type="primary"
+              @click="deletes(scope.row)"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              >删除</ws-button
+            >
+            <ws-button
+              type="primary"
+              @click="stop(scope.row)"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              >禁用</ws-button
+            >
+          </template>
         </el-table-column>
       </el-table>
       <el-pagination
@@ -145,7 +237,11 @@
   </div>
 </template>
 <script>
-import { selectDriver, billoperatehis } from '@/model/transport/index'
+import {
+  selectDriver,
+  billoperatehis,
+  delDriver,
+} from '@/model/transport/index'
 import Pagination from '@/components/Pagination'
 // provinceAndCityData省市二级
 import { provinceAndCityData, CodeToText } from 'element-china-area-data'
@@ -185,6 +281,7 @@ export default {
       contractType: 2,
       startDate: null,
       endDate: null,
+      carNumber: '',
       searchTypeText: '',
       // 提交类型
       submitType: true,
@@ -196,6 +293,12 @@ export default {
         year: dayjs().format('YYYY'),
         month: dayjs().format('MM'),
       },
+      expands: [], //只展开一行放入当前行id
+      getRowKeys: (row) => {
+        //获取当前行id
+        // console.log(row)
+        return row.id //这里看这一行中需要根据哪个属性值是id
+      },
       driverList: [],
       deptBudgetList: {},
       historyList: [],
@@ -212,11 +315,21 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    expandsHandle(row) {
+      row.expandsStatus = !row.expandsStatus
+      this.$refs.expandstable.toggleRowExpansion(row)
+    },
     //查找
     handleLook() {
       this.currentPage = 1
       this.getList()
     },
+    look(row) {
+      this.$router.push({
+        name: 'tranManagementDriverLook',
+        query: { id: row.id },
+      })
+    },
     //添加
     handleAdd() {
       this.$router.push({ path: 'tranManagementDriverAdd' })
@@ -228,27 +341,39 @@ export default {
     handleDelete() {
       this.$router.push({ path: 'warehouseManagementDelete' })
     },
-    dateFormat(fmt, date) {
-      let ret
-      const opt = {
-        'Y+': date.getFullYear().toString(), // 年
-        'm+': (date.getMonth() + 1).toString(), // 月
-        'd+': date.getDate().toString(), // 日
-        'H+': date.getHours().toString(), // 时
-        // "M+": date.getMinutes().toString(),         // 分
-        // "S+": date.getSeconds().toString()          // 秒
-        // 有其他格式化字符需求可以继续添加,必须转化成字符串
-      }
-      for (let k in opt) {
-        ret = new RegExp('(' + k + ')').exec(fmt)
-        if (ret) {
-          fmt = fmt.replace(
-            ret[1],
-            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
-          )
+    selectcar(e, row) {
+      console.log(e, row)
+      for (var i = 0; i < row.driverCarInfoList.length; i++) {
+        if (e == row.driverCarInfoList[i].carNumber) {
+          row.carModel = row.driverCarInfoList[i].carModel
+          row.carLength = row.driverCarInfoList[i].carLength
         }
       }
-      return fmt
+    },
+    deletes(row) {
+      this.$confirm(`司机信息删除后不可恢复,是否确定删除?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          delDriver({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              console.log(response)
+              EventBus.$emit('error', response.message)
+            })
+        })
+        .catch(() => {
+          return false
+        })
     },
     handleClose() {
       this.accessoryTFs = false
@@ -273,15 +398,23 @@ export default {
       })
         .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 = []
-          //   }
-          // }
+          for (var i = 0; i < response.records.length; i++) {
+            response.records[i].expandsStatus = false
+            response.records[i].carNumber =
+              response.records[i].driverCarInfoList[0].carNumber
+            response.records[i].carModel =
+              response.records[i].driverCarInfoList[0].carModel
+            response.records[i].carLength =
+              response.records[i].driverCarInfoList[0].carLength
+            //   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
@@ -375,4 +508,7 @@ export default {
 .findValue {
   margin: 0 10px;
 }
+/deep/.el-icon-arrow-right {
+  display: none;
+}
 </style>

+ 75 - 9
src/views/tranManagement/tranManagementDriverAdd.vue

@@ -221,8 +221,12 @@
               prop="contractNo"
               class="el-car bg-right"
             >
-              <el-radio v-model="item.radio" label="1">私人账号</el-radio>
-              <el-radio v-model="item.radio" label="2">企业账户</el-radio>
+              <el-radio v-model="item.accountTypeFlag" label="1"
+                >私人账号</el-radio
+              >
+              <el-radio v-model="item.accountTypeFlag" label="2"
+                >企业账户</el-radio
+              >
             </ws-form-item>
             <!--账号-->
             <ws-form-item label="账号" span="1" prop="bankCard" class="el-car">
@@ -232,6 +236,25 @@
                 maxlength="100"
                 size="small"
               />
+              <el-upload
+                :headers="headers"
+                :action="uploadPath"
+                :show-file-list="false"
+                :on-success="uploadSuccessHandle"
+                class="avatar-uploader"
+                accept=".jpg, .jpeg, .png, .gif"
+                ><img
+                  width="18"
+                  height="20"
+                  style="
+                    vertical-align: text-top;
+                    position: relative;
+                    top: -1px;
+                  "
+                  src="../../../public/img/fujian.png"
+                  alt=""
+                />
+              </el-upload>
             </ws-form-item>
             <!--开户行-->
             <ws-form-item
@@ -250,7 +273,7 @@
             <!--姓名-->
             <ws-form-item
               label="姓名"
-              v-if="item.radio == 1"
+              v-if="item.accountTypeFlag == 1"
               span="1"
               prop="payeeName"
               class="el-car"
@@ -283,7 +306,7 @@
             <!--身份证号-->
             <ws-form-item
               label="身份证号"
-              v-if="item.radio == 1"
+              v-if="item.accountTypeFlag == 1"
               span="1"
               prop="payeeNumberCard"
               class="el-car"
@@ -298,11 +321,35 @@
             <!--身份证附件-->
             <ws-form-item
               label="身份证附件"
-              v-if="item.radio == 1"
+              v-if="item.accountTypeFlag == 1"
               span="1"
               prop="cardAddressUrl"
               class="el-car"
             >
+              <el-upload
+                :headers="headers"
+                action="https://www.zthymaoyi.com/upload/admin"
+                :show-file-list="false"
+                :on-success="uploadSuccessHandle"
+                class="avatar-uploader"
+                accept=".jpg, .jpeg, .png, .gif"
+                ><img
+                  width="18"
+                  height="20"
+                  style="
+                    vertical-align: text-top;
+                    position: relative;
+                    top: -1px;
+                  "
+                  src="../../../public/img/fujian.png"
+                  alt=""
+                />
+              </el-upload>
+              <span v-if="item.addressUrlArray.length > 0">{{
+                item.addressUrlArray.length
+              }}</span>
+              <span v-if="item.addressUrlArray.length == 0">未上传</span>
+              <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
               <!-- <ws-input
             v-model="deptBudgetList.driverPayeeInfo.personNo"
             placeholder="请输入身份证附件"
@@ -411,6 +458,7 @@ export default {
       size: 10,
       value1: '',
       unitList: [],
+      accessoryBankTFs: false,
       freightspace: [
         {
           carNumber: '',
@@ -424,12 +472,12 @@ export default {
       ],
       freightspace1: [
         {
-          account_type: '',
-          radio: '1',
+          accountTypeFlag: '1',
           payeeName: '',
           payeeNumberCard: '',
           compName: '',
           bankDeposit: '',
+          addressUrlArray: [],
           bankCard: '',
         },
       ],
@@ -458,6 +506,9 @@ export default {
       }
       this.age = age
     },
+    bankcardfujian(item) {
+      this.accessoryBankTFs = true
+    },
     loaddata() {
       // 车型
       packList({ constId: 'TRAN1' })
@@ -476,6 +527,20 @@ export default {
       this.listDate.level = 'city'
       this.listDate.country = this.name
     },
+    uploadSuccessHandle(e, file) {
+      const that = this
+      this.upForm.personNoImg = e.url
+      this.upForm.type = 'driver'
+      this.submiting = true
+      // personShibie(this.upForm).then((response) => {
+      //   this.list.unshift(response.data.data)
+      //   this.upForm.driver = response.data.data.driver
+      //   this.upForm.driverNo = response.data.data.driverNo
+      //   this.upForm.driverAddress = response.data.data.driverAddress
+      //   this.upFormVisible = true
+      //   this.submiting = false
+      // })
+    },
     // 关闭 dialog时 处理文件url 初始化upload组件
     handleClose() {
       this.dialogViewSpareMoney = false
@@ -498,13 +563,13 @@ export default {
     },
     add1() {
       this.freightspace1.push({
-        account_type: '',
-        radio: '1',
+        accountTypeFlag: '1',
         payeeName: '',
         payeeNumberCard: '',
         compName: '',
         bankDeposit: '',
         bankCard: '',
+        addressUrlArray: [],
       })
     },
     del1(index) {
@@ -512,6 +577,7 @@ export default {
         this.freightspace1.splice(index, 1)
       }
     },
+    identitycardfujian(item) {},
     handleChange(value) {
       this.selectedOptions = value
     },

+ 855 - 0
src/views/tranManagement/tranManagementDriverLook.vue

@@ -0,0 +1,855 @@
+//添加司机
+<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
+      ref="deptBudgetList"
+      :rules="mainReportAdd"
+      :model="deptBudgetList"
+    >
+      <div class="flex">
+        <div class="driver">司机信息</div>
+        <ws-info-table>
+          <!--司机姓名-->
+          <ws-form-item
+            label="姓名"
+            span="1"
+            prop="contractNo"
+            class="readonly bg-right"
+          >
+            <ws-input
+              v-model="deptBudgetList.driverName"
+              placeholder="请输入司机姓名"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!--手机号-->
+          <ws-form-item
+            label="手机号"
+            span="1"
+            prop="driverPhone"
+            class="readonly"
+          >
+            <ws-input
+              v-model="deptBudgetList.driverPhone"
+              placeholder="请输入手机号"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--常驻城市-->
+          <ws-form-item label="常驻城市" span="1" prop="acceptanceMethod">
+            <el-cascader
+              :options="options_"
+              v-model="selectedOptions"
+              clearable
+              size="large"
+              placeholder="请选择常驻城市"
+              style="width: 200%"
+              class="el-cascader"
+              @change="handleChange"
+            />
+          </ws-form-item>
+
+          <!--身份证号-->
+          <ws-form-item
+            label="身份证号"
+            span="1"
+            prop="driverNo"
+            class="readonly"
+          >
+            <ws-input
+              v-model="deptBudgetList.numberCard"
+              placeholder="请输入身份证号"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+        {{ age }}
+      </div>
+    </ws-form>
+
+    <ws-form
+      ref="deptBudgetList"
+      :rules="mainReportAdd"
+      :model="deptBudgetList"
+    >
+      <div
+        style="width: 100%"
+        class="flex position"
+        v-for="(item, index) in freightspace"
+      >
+        <div class="flex">
+          <div class="driver">货车信息-{{ index + 1 }}</div>
+          <ws-info-table class="el-table">
+            <!--车牌号-->
+            <ws-form-item
+              label="车牌号"
+              span="1"
+              prop="carNumber"
+              class="forlist"
+              width="400px"
+            >
+              <ws-input
+                v-model="item.carNumber"
+                placeholder="请输入车牌号"
+                maxlength="20"
+                size="small"
+              />
+            </ws-form-item>
+            <!--车型-->
+            <ws-form-item label="车型" span="1" prop="carModel" class="forlist">
+              <ws-select
+                v-model="item.carModel"
+                placeholder=""
+                class="typeselect"
+                @change="selectcarModel"
+              >
+                <ws-option
+                  v-for="item in carModelList"
+                  :key="item.constKey"
+                  :label="item.constValue"
+                  :value="item.constValue"
+                />
+              </ws-select>
+            </ws-form-item>
+            <!--车长-->
+            <ws-form-item
+              label="不含车头车长(米)"
+              span="1"
+              prop="carLength"
+              class="forlist"
+            >
+              <ws-select
+                v-model="item.carLength"
+                placeholder=""
+                class="typeselect"
+                @change="selectcarLength"
+              >
+                <ws-option
+                  v-for="item in carLengthList"
+                  :key="item.constKey"
+                  :label="item.constValue"
+                  :value="item.constValue"
+                />
+              </ws-select>
+            </ws-form-item>
+            <!--载重-->
+            <ws-form-item label="载重" span="1" prop="carLoad" class="forlist">
+              <ws-input
+                v-model="item.carLoad"
+                placeholder="请输入载重"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+
+            <!--出厂年份-->
+            <ws-form-item
+              label="出厂年份"
+              span="1"
+              prop="yearManufacture"
+              class="forlist"
+            >
+              <ws-input
+                v-model="item.yearManufacture"
+                placeholder="请输入年份"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+          </ws-info-table>
+          <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=""
+          />
+        </div>
+      </div>
+    </ws-form>
+    <ws-form
+      ref="deptBudgetList"
+      :rules="mainReportAdd"
+      :model="deptBudgetList"
+    >
+      <div
+        style="width: 100%"
+        class="flex position"
+        v-for="(item, index) in freightspace1"
+      >
+        <div class="flex">
+          <div class="driver">收款人账户信息-{{ index + 1 }}</div>
+          <ws-info-table class="el-table">
+            <!--账户类型-->
+            <ws-form-item
+              label="账户类型"
+              span="1"
+              prop="contractNo"
+              class="el-car bg-right"
+            >
+              <el-radio v-model="item.radio" label="1">私人账号</el-radio>
+              <el-radio v-model="item.radio" label="2">企业账户</el-radio>
+            </ws-form-item>
+            <!--账号-->
+            <ws-form-item label="账号" span="1" prop="bankCard" class="el-car">
+              <ws-input
+                v-model="item.bankCard"
+                placeholder="请输入账号"
+                maxlength="100"
+                size="small"
+              />
+              <el-upload
+                :headers="headers"
+                :action="uploadPath"
+                :show-file-list="false"
+                :on-success="uploadSuccessHandle"
+                class="avatar-uploader"
+                accept=".jpg, .jpeg, .png, .gif"
+                ><img
+                  width="18"
+                  height="20"
+                  style="
+                    vertical-align: text-top;
+                    position: relative;
+                    top: -1px;
+                  "
+                  src="../../../public/img/fujian.png"
+                  alt=""
+                />
+              </el-upload>
+            </ws-form-item>
+            <!--开户行-->
+            <ws-form-item
+              label="开户行"
+              span="1"
+              prop="bankDeposit"
+              class="el-car"
+            >
+              <ws-input
+                v-model="item.bankDeposit"
+                placeholder="请输入开户行"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+            <!--姓名-->
+            <ws-form-item
+              label="姓名"
+              v-if="item.radio == 1"
+              span="1"
+              prop="payeeName"
+              class="el-car"
+              width="150px"
+            >
+              <ws-input
+                v-model="item.payeeName"
+                placeholder="请输入姓名"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+            <!--企业名称-->
+            <ws-form-item
+              label="企业名称"
+              v-else
+              span="1"
+              prop="compName"
+              class="el-car"
+              width="150px"
+            >
+              <ws-input
+                v-model="item.compName"
+                placeholder="请输入企业名称"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+
+            <!--身份证号-->
+            <ws-form-item
+              label="身份证号"
+              v-if="item.radio == 1"
+              span="1"
+              prop="payeeNumberCard"
+              class="el-car"
+            >
+              <ws-input
+                v-model="item.payeeNumberCard"
+                placeholder="请输入身份证号"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+            <!--身份证附件-->
+            <ws-form-item
+              label="身份证附件"
+              v-if="item.radio == 1"
+              span="1"
+              prop="cardAddressUrl"
+              class="el-car"
+            >
+              <el-upload
+                :headers="headers"
+                action="https://www.zthymaoyi.com/upload/admin"
+                :show-file-list="false"
+                :on-success="uploadSuccessHandle"
+                class="avatar-uploader"
+                accept=".jpg, .jpeg, .png, .gif"
+                ><img
+                  width="18"
+                  height="20"
+                  style="
+                    vertical-align: text-top;
+                    position: relative;
+                    top: -1px;
+                  "
+                  src="../../../public/img/fujian.png"
+                  alt=""
+                />
+              </el-upload>
+              <span v-if="item.addressUrlArray.length > 0">{{
+                item.addressUrlArray.length
+              }}</span>
+              <span v-if="item.addressUrlArray.length == 0">未上传</span>
+              <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
+              <!-- <ws-input
+            v-model="deptBudgetList.driverPayeeInfo.personNo"
+            placeholder="请输入身份证附件"
+            maxlength="100"
+            size="small"
+          /> -->
+            </ws-form-item>
+          </ws-info-table>
+          <img
+            width="22"
+            height="22"
+            class="add"
+            @click="add1"
+            src="../../../public/img/add.png"
+            alt=""
+          />
+          <img
+            width="22"
+            height="22"
+            class="del"
+            @click="del1(index)"
+            src="../../../public/img/del.png"
+            alt=""
+          />
+        </div>
+      </div>
+    </ws-form>
+    <ws-form
+      ref="deptBudgetList"
+      :rules="mainReportAdd"
+      :model="deptBudgetList"
+    >
+      <div class="flex">
+        <div class="driver">相关附件</div>
+        <ws-upload
+          ref="upload"
+          table-name="maintain_work_order"
+          oss-key="mainPlan"
+          :comp-id="compId"
+          :appendix-ids="appendixIdsAdd"
+          :vesselId="deptBudgetList.addressUrl"
+          :size-limit="size"
+          @uploadSuccess="uploadSuccess"
+          @onChange="onChange"
+          accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+        />
+      </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 { provinceAndCityData, CodeToText } from 'element-china-area-data'
+import { lookDriver } 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 {
+      deptBudgetList: {
+        totalStorage: 0,
+        drivercarInfo: {
+          goodsName: '',
+        },
+        driverPayeeInfo: {},
+      },
+      radio: '1',
+      carModelList: [],
+      carLengthList: [],
+      options_: provinceAndCityData,
+      heightData: '600px',
+      zoom: 7,
+      selectedOptions: [],
+      center: [116.244694, 39.517344],
+      window: '',
+      district: null,
+      listDate: { country: '中国', level: 'country', city: '' },
+      citylist: [],
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      mainReportAdd: {},
+      appendixIdsAdd: '',
+      size: 10,
+      value1: '',
+      unitList: [],
+      accessoryBankTFs: false,
+      freightspace: [
+        {
+          carNumber: '',
+          carModel: '高栏',
+          carModelKey: '1',
+          carLength: '13',
+          carLengthKey: '1',
+          carLoad: '',
+          yearManufacture: '',
+        },
+      ],
+      freightspace1: [
+        {
+          account_type: '',
+          radio: '1',
+          payeeName: '',
+          payeeNumberCard: '',
+          compName: '',
+          bankDeposit: '',
+          addressUrlArray: [],
+          bankCard: '',
+        },
+      ],
+      name: '',
+      age: '',
+    }
+  },
+  activated() {
+    this.loaddata()
+    this.showType = this.isShow
+  },
+  computed: {},
+  methods: {
+    IdCard(UUserCard) {
+      //获取年龄
+      var myDate = new Date()
+      var month = myDate.getMonth() + 1
+      var day = myDate.getDate()
+      var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
+      if (
+        UUserCard.substring(10, 12) < month ||
+        (UUserCard.substring(10, 12) == month &&
+          UUserCard.substring(12, 14) <= day)
+      ) {
+        age++
+      }
+      this.age = age
+    },
+    bankcardfujian(item) {
+      this.accessoryBankTFs = true
+    },
+    loaddata() {
+      lookDriver({ id: this.$route.query.id })
+        .toPromise()
+        .then((response) => {
+          this.deptBudgetList = response
+        })
+      //   // 车型
+      //   packList({ constId: 'TRAN1' })
+      //     .toPromise()
+      //     .then((response) => {
+      //       this.carModelList = response
+      //     })
+      //   // 车长
+      //   packList({ constId: 'TRAN2' })
+      //     .toPromise()
+      //     .then((response) => {
+      //       this.carLengthList = response
+      //     })
+    },
+    confirmPositioncity() {
+      this.listDate.level = 'city'
+      this.listDate.country = this.name
+    },
+    uploadSuccessHandle(e, file) {
+      const that = this
+      this.upForm.personNoImg = e.url
+      this.upForm.type = 'driver'
+      this.submiting = true
+      // personShibie(this.upForm).then((response) => {
+      //   this.list.unshift(response.data.data)
+      //   this.upForm.driver = response.data.data.driver
+      //   this.upForm.driverNo = response.data.data.driverNo
+      //   this.upForm.driverAddress = response.data.data.driverAddress
+      //   this.upFormVisible = true
+      //   this.submiting = false
+      // })
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    add() {
+      this.freightspace.push({
+        carNumber: '',
+        carModel: '高栏',
+        carModelKey: '1',
+        carLength: '13',
+        carLengthKey: '1',
+        carLoad: '',
+        yearManufacture: '',
+      })
+    },
+    del(index) {
+      if (this.freightspace.length > 1) {
+        this.freightspace.splice(index, 1)
+      }
+    },
+    add1() {
+      this.freightspace1.push({
+        account_type: '',
+        radio: '1',
+        payeeName: '',
+        payeeNumberCard: '',
+        compName: '',
+        bankDeposit: '',
+        bankCard: '',
+        addressUrlArray: [],
+      })
+    },
+    del1(index) {
+      if (this.freightspace1.length > 1) {
+        this.freightspace1.splice(index, 1)
+      }
+    },
+    identitycardfujian(item) {},
+    handleChange(value) {
+      this.selectedOptions = value
+    },
+    returnsales() {
+      this.$router.push({ path: 'tranManagementDriver' })
+    },
+    // 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
+    },
+    selectcarModel(e) {
+      for (var i = 0; i < this.carModelList.length; i++) {
+        if (this.carModelList[i].constValue == e) {
+          this.deptBudgetList.carModelKey = this.carModelList[i].constKey
+        }
+      }
+    },
+    selectcarLength(e) {
+      for (var i = 0; i < this.carLengthList.length; i++) {
+        if (this.carLengthList[i].constValue == e) {
+          this.deptBudgetList.carLengthKey = this.carLengthList[i].constKey
+        }
+      }
+    },
+    onChange(files) {
+      this.fileNum = files
+      this.$refs.upload.handleSaveBill().then((res) => {
+        console.log(files)
+      })
+    },
+
+    submit() {
+      console.log(this.freightspace)
+
+      this.$refs.deptBudgetList.validate((valid) => {
+        if (valid) {
+          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
+          this.deptBudgetList.residentCityProvincial =
+            CodeToText[this.selectedOptions[0]]
+          this.deptBudgetList.residentCityMunicipal =
+            CodeToText[this.selectedOptions[1]]
+          this.deptBudgetList.driverCarInfoList = this.freightspace
+          this.deptBudgetList.driverPayeeInfoList = this.freightspace1
+          addDriver(this.deptBudgetList)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('添加成功')
+              this.$router.push({ path: 'tranManagementDriver' })
+            })
+        } else {
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
+        }
+      })
+    },
+    resetForm(deptBudgetList) {
+      this.$refs[deptBudgetList].resetFields()
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.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 10%;
+}
+/deep/.ws-info-table .el-form-item {
+  border-right: 1px solid #cdd2dc;
+  border-bottom: 1px solid #cdd2dc;
+}
+.readonly {
+  position: relative;
+}
+.title {
+  position: relative;
+}
+.el-car {
+  width: 413px;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-col {
+  background: #f6f7fc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+  border-left: 1px solid #cdd2dc;
+  background: #fafbfc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+  background: #f0f2f6;
+  // 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__label {
+  text-align: center;
+}
+.el-table {
+  width: 1240px;
+}
+.ce {
+  width: 900px;
+  margin: 0 auto;
+}
+.driver {
+  width: 120px;
+  margin-top: 10px;
+  font-weight: bold;
+}
+
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+.winseaview-view {
+  padding: 0 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 80px;
+}
+/deep/.ws-info-table .el-form-item {
+  width: 25%;
+}
+.el-textarea__inner {
+  display: none;
+}
+.el-form {
+  margin-top: 50px;
+}
+.readonly {
+  width: 16%;
+}
+.el-cascader {
+  width: 145px;
+}
+.forlist {
+  width: 20%;
+}
+.el-form-item.forlist.is-success.el-form-item--small {
+  width: 20%;
+}
+.el-form-item.forlist.el-form-item--small {
+  width: 20%;
+}
+.el-form-item.readonly.is-success.el-form-item--small.showLableToopTip {
+  width: 20%;
+}
+.el-form-item.el-car.el-form-item--small {
+  width: 33.3%;
+}
+</style>

+ 5 - 0
src/views/warehouse/warehouseManagementList.vue

@@ -549,6 +549,11 @@ export default {
 /deep/.el-table tr th.is-leaf:first-child {
   border-left: 1px solid #e9ecf7;
 }
+/deep/.el-table .el-table__header .cell,
+/deep/.el-table .el-table__body .cell {
+  -webkit-line-clamp: 10;
+  max-height: 400px;
+}
 .record,
 .adjustment {
   display: inline-block;

+ 2 - 2
vue.config.js

@@ -143,8 +143,8 @@ module.exports = {
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
-        target: 'http://192.168.1.119:8090/',
-        // target: 'http://192.168.1.124:8090/',
+        // target: 'http://192.168.1.121:8090/',
+        target: 'http://192.168.1.124:8090/',
         // target: 'http://192.168.1.119:8090/',
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://product-server.winsea.com/',