gjy 4 tahun lalu
induk
melakukan
f1d9ee0123
29 mengubah file dengan 7845 tambahan dan 666 penghapusan
  1. 3 1
      src/api/V2/transport/index.js
  2. 19 1
      src/lang/zh.js
  3. 8 2
      src/model/transport/index.js
  4. 1 0
      src/store/getters.js
  5. 7 0
      src/store/modules/app.js
  6. 1 1
      src/views/contractManagement/purchaseContractAdd.vue
  7. 96 20
      src/views/tranManagement/component/routers/route.js
  8. 120 65
      src/views/tranManagement/tranManagementDriverAdd.vue
  9. 133 13
      src/views/tranManagement/tranManagementDriverEdit.vue
  10. 919 0
      src/views/tranManagement/tranManagementLook.vue
  11. 461 135
      src/views/tranManagement/tranManagementTransport.vue
  12. 853 0
      src/views/tranManagement/tranManagementTransportAdd.vue
  13. 836 0
      src/views/tranManagement/tranManagementTransportEdit.vue
  14. 648 0
      src/views/tranManagement/tranManagementVehicle.vue
  15. 909 0
      src/views/tranManagement/tranManagementVehicleDispatching.vue
  16. 909 0
      src/views/tranManagement/tranManagementVehicleLook.vue
  17. 2 6
      src/views/warehouse/component/router/index.js
  18. 31 16
      src/views/warehouse/warehouseManagementAdd.vue
  19. 15 4
      src/views/warehouse/warehouseManagementDelete.vue
  20. 386 4
      src/views/warehouse/warehouseManagementDelivery.vue
  21. 7 8
      src/views/warehouse/warehouseManagementEdit.vue
  22. 139 89
      src/views/warehouse/warehouseManagementIoss.vue
  23. 15 11
      src/views/warehouse/warehouseManagementList.vue
  24. 16 26
      src/views/warehouse/warehouseManagementLook.vue
  25. 49 27
      src/views/warehouse/warehouseManagementNoComplete.vue
  26. 388 110
      src/views/warehouse/warehouseManagementPerfectDelivery.vue
  27. 414 66
      src/views/warehouse/warehouseManagementPerfectput.vue
  28. 459 60
      src/views/warehouse/warehouseManagementPut.vue
  29. 1 1
      src/views/warehouse/warehouseManagementRecord.vue

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

@@ -1,5 +1,7 @@
 // 司机列表
 export const API_GET_TRAN_DRIVERINFO = '/driverViewInfo/selectDriverInfoPage'
+export const API_GET_TRAN_LIST = '/tranTaskInfo/selectTranTaskInfoPage'
+export const API_POST_TRAN_ADD = '/tranTaskInfo/api/addTranTask'
 // 司机管理添加
 export const API_POST_TRAN_DRIVERINFOADD = '/driverViewInfo/api/addInfo'
 // 司机管理查看
@@ -19,4 +21,4 @@ export const API_GET_bank = '/driverViewInfo/bankShibie'
 // 司机管理-编辑
 export const API_POST_EDIT_DRIVER = '/driverViewInfo/api/editInfo'
 // 司机管理-车头、车型
-export const API_GET_PRAAMETER = '/commonSysParameter/getInfo'
+export const API_GET_PRAAMETER = '/commonSysParameter/getInfo'

+ 19 - 1
src/lang/zh.js

@@ -510,6 +510,14 @@
     tranManagementTransport: '运输任务',
     tranManagementDriverEdit: '编辑司机',
 
+    warehouseManagementPerfectDelivery: '编辑',
+    tranManagementLook: '运输任务查看',
+    tranManagementTransportAdd: '运输任务添加',
+    tranManagementTransportEdit: '运输任务编辑',
+    tranManagementVehicle: '汽运调度',
+    tranManagementVehicleDispatching: '汽车调度',
+    tranManagementVehicleLook: '查看派车详情',
+
     // 采购模块
     procurement: '采购管理',
     sparepart: '备件采购',
@@ -4710,9 +4718,19 @@
     tranManagementDriver: '司机管理',
     tranManagementDriverAdd: '添加司机',
     tranManagementDriverLook: '查看司机',
-    tranManagementTransport: '运输任务',
     tranManagementDriverEdit: '编辑司机'
   },
+  tranManagementTransport: {
+    tranManagementTransport: '运输任务',
+    tranManagementLook: '运输任务查看',
+    tranManagementTransportAdd: '运输任务添加',
+    tranManagementTransportEdit: '运输任务编辑',
+  },
+  tranManagementVehicle: {
+    tranManagementVehicle: '汽运调度',
+    tranManagementVehicleDispatching: '汽车调度',
+    tranManagementVehicleLook: '查看派车详情',
+  },
   // 年度培训
   annualTraining: {
     trainingResults: '培训结果',

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

@@ -4,6 +4,8 @@ import { appRx } from '../defalutConfig/indexRx'
 import {
     API_GET_TRAN_DRIVERINFO,
     API_POST_TRAN_DRIVERINFOADD,
+    API_GET_TRAN_LIST,
+    API_POST_TRAN_ADD,
     API_GET_DRIVERINFO_GETDRIVER,
     API_POST_DELETE_DRIVER,
     API_POST_DISABLE_DRIVER,
@@ -12,12 +14,16 @@ import {
     API_POST_PERSON,
     API_GET_bank,
     API_POST_EDIT_DRIVER,
-    API_GET_PRAAMETER
+    API_GET_PRAAMETER,
 } from '@/api/V2/transport'
 // 司机列表
 export const selectDriver = appRx.get(API_GET_TRAN_DRIVERINFO, errorCatcher, errorHandle, filter)
 // 添加司机信息
 export const addDriver = appRx.post(API_POST_TRAN_DRIVERINFOADD, errorCatcher, errorHandle, filter)
+//运输任务列表
+export const gain = appRx.get(API_GET_TRAN_LIST, errorCatcher, errorHandle, filter)
+//运输任务添加
+export const addtrantask = appRx.post(API_POST_TRAN_ADD, errorCatcher, errorHandle, filter)
 // 司机管理-查看
 export const lookDriver = appRx.get(API_GET_DRIVERINFO_GETDRIVER, errorCatcher, errorHandle, filter)
 // 司机管理-删除
@@ -35,4 +41,4 @@ export const getbank = appRx.get(API_GET_bank, errorCatcher, errorHandle, filter
 // 司机管理-编辑
 export const editdriver = appRx.post(API_POST_EDIT_DRIVER, errorCatcher, errorHandle, filter)
 // 司机管理-车头、车型
-export const packList = appRx.get(API_GET_PRAAMETER, errorCatcher, errorHandle, filter)
+export const packList = appRx.get(API_GET_PRAAMETER, errorCatcher, errorHandle, filter)

+ 1 - 0
src/store/getters.js

@@ -44,6 +44,7 @@ const getters = {
   systemOperationNum: state => state.app.systemOperationNum,
   systemWarnNum: state => state.app.systemWarnNum,
   baseInfo: state => state.user.baseInfo, // 设置系统基础信息
+  deptBudgetList: state => state.app.deptBudgetList,
   guideInfo: state => state.user.guideInfo, // 新手指引信息
   sparepartSp: state => state.app.sparepartSp, // 搜索状态
   sparepartMa: state => state.app.sparepartMa, // 搜索状态

+ 7 - 0
src/store/modules/app.js

@@ -15,6 +15,7 @@ const state = {
   sparepartMa: {},
   sparepartMap: {},
   isLoadding: false,
+  deptBudgetList:{},
   // 产品-体系-文件修改程序(待处理个数)
   modificationNum: 0,
   // 产品-体系运行-预警
@@ -84,6 +85,9 @@ const mutations = {
     state.circulationNum = num
     Cookies.set('circulationNum', num)
   },
+  SET_DEPTBUDGETLIST: (state, deptBudgetList) => {
+    state.deptBudgetList = deptBudgetList
+  },
 }
 
 const actions = {
@@ -108,6 +112,9 @@ const actions = {
   setMaQueryParams ({ commit }, params) {
     commit('SET_SPAREPARTMA_QUERY', params)
   },
+  setdeptBudgetList ({ commit }, params) {
+    commit('SET_DEPTBUDGETLIST', params)
+  },
   setMapQueryParams ({ commit }, params) {
     commit('SET_SPAREPARTMAP_QUERY', params)
   },

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

@@ -1133,7 +1133,7 @@ export default {
             .toPromise()
             .then((response) => {
               this.$message.success('添加成功')
-              this.$router.push({ path: 'salesContract' })
+              this.$router.push({ path: 'purchaseContract' })
             })
         } else {
           EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))

+ 96 - 20
src/views/tranManagement/component/routers/route.js

@@ -12,6 +12,7 @@ const tranManagementRouter = {
     icon: 'cg'
   },
   children: [
+
     //运输任务
     {
       path: 'tranManagementTransport',
@@ -26,20 +27,6 @@ const tranManagementRouter = {
         keepAlive: true
       },
     },
-    //司机管理
-    {
-      path: 'tranManagementDriver',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementDriver'),
-      name: 'tranManagementDriver',
-      meta: {
-        title: 'tranManagementDriver',
-        shortcutEntrance: 'tranManagement',
-        module: 'tranManagement.tranManagementDriver',
-        permissicon: [],
-        keepAlive: true
-      }
-    },
     //添加司机
     {
       path: 'tranManagementDriverAdd',
@@ -55,16 +42,16 @@ const tranManagementRouter = {
       },
       hidden: true
     },
-    //查看司机
+    //运输查看
     {
-      path: 'tranManagementDriverLook',
+      path: 'tranManagementLook',
       component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementDriverLook'),
-      name: 'tranManagementDriverLook',
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementLook'),
+      name: 'tranManagementLook',
       meta: {
-        title: 'tranManagementDriverLook',
+        title: 'tranManagementLook',
         shortcutEntrance: 'tranManagement',
-        module: 'tranManagement.tranManagementDriver.tranManagementDriverLook',
+        module: 'tranManagement.tranManagementDriver.tranManagementLook',
         permissicon: [],
         keepAlive: true
       },
@@ -85,6 +72,95 @@ const tranManagementRouter = {
       },
       hidden: true
     },
+    //运输添加
+    {
+      path: 'tranManagementTransportAdd',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementTransportAdd'),
+      name: 'tranManagementTransportAdd',
+      meta: {
+        title: 'tranManagementTransportAdd',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementTransportAdd',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
+    //运输编辑
+    {
+      path: 'tranManagementTransportEdit',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementTransportEdit'),
+      name: 'tranManagementTransportEdit',
+      meta: {
+        title: 'tranManagementTransportEdit',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementTransportEdit',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
+    //汽运调度
+    {
+      path: 'tranManagementVehicle',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementVehicle'),
+      name: 'tranManagementVehicle',
+      meta: {
+        title: 'tranManagementVehicle',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementVehicle',
+        permissicon: [],
+        keepAlive: true
+      },
+
+    },
+    //司机管理
+    {
+      path: 'tranManagementDriver',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementDriver'),
+      name: 'tranManagementDriver',
+      meta: {
+        title: 'tranManagementDriver',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver',
+        permissicon: [],
+        keepAlive: true
+      }
+    },
+    //汽车调度
+    {
+      path: 'tranManagementVehicleDispatching',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementVehicleDispatching'),
+      name: 'tranManagementVehicleDispatching',
+      meta: {
+        title: 'tranManagementVehicleDispatching',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementVehicleDispatching',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
+    //查看派车详情
+    {
+      path: 'tranManagementVehicleLook',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementVehicleLook'),
+      name: 'tranManagementVehicleLook',
+      meta: {
+        title: 'tranManagementVehicleLook',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementVehicleLook',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
 
   ],
 

+ 120 - 65
src/views/tranManagement/tranManagementDriverAdd.vue

@@ -388,66 +388,120 @@
       :model="deptBudgetList"
     >
       <div class="flex">
-        <el-upload
-          action="https://www.zthymaoyi.com/upload/admin"
-          :show-file-list="false"
-          :on-success="uploadSuccessHandletravel"
-          class="avatar-uploader"
-          accept=".jpg, .jpeg, .png, .gif"
-          ><el-button class="upload" size="small" type="primary"
-            >行驶证</el-button
-          >
-        </el-upload>
-        <el-upload
-          action="https://www.zthymaoyi.com/upload/admin"
-          :show-file-list="false"
-          :on-success="uploadSuccessHandledrive"
-          class="avatar-uploader"
-          accept=".jpg, .jpeg, .png, .gif"
-          ><el-button class="upload" size="small" type="primary"
-            >驾驶证</el-button
-          >
-        </el-upload>
-        <el-upload
-          action="https://www.zthymaoyi.com/upload/admin"
-          :show-file-list="false"
-          :on-success="uploadSuccessHandleway"
-          class="avatar-uploader"
-          accept=".jpg, .jpeg, .png, .gif"
-          ><el-button class="upload" size="small" type="primary"
-            >道路运营证</el-button
-          >
-        </el-upload>
-        <el-upload
-          action="https://www.zthymaoyi.com/upload/admin"
-          :show-file-list="false"
-          :on-success="uploadSuccessHandlequalification"
-          class="avatar-uploader"
-          accept=".jpg, .jpeg, .png, .gif"
-          ><el-button class="upload" size="small" type="primary"
-            >从业资格证</el-button
-          >
-        </el-upload>
-        <el-upload
-          action="https://www.zthymaoyi.com/upload/admin"
-          :show-file-list="false"
-          :on-success="uploadSuccessHandleidentityjust"
-          class="avatar-uploader"
-          accept=".jpg, .jpeg, .png, .gif"
-          ><el-button class="upload" size="small" type="primary"
-            >身份证正面</el-button
-          >
-        </el-upload>
-        <el-upload
-          action="https://www.zthymaoyi.com/upload/admin"
-          :show-file-list="false"
-          :on-success="uploadSuccessHandleidentityagainst"
-          class="avatar-uploader"
-          accept=".jpg, .jpeg, .png, .gif"
-          ><el-button class="upload" size="small" type="primary"
-            >身份证反面</el-button
-          >
-        </el-upload>
+        <div>
+          <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="uploadSuccessHandletravel"
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button class="upload" size="small" type="primary"
+              >行驶证</el-button
+            >
+          </el-upload>
+          <img
+            v-show="addressUrls.travel"
+            width="100"
+            height="100"
+            :src="addressUrls.travel"
+            alt=""
+          />
+        </div>
+        <div>
+          <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="uploadSuccessHandledrive"
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button class="upload" size="small" type="primary"
+              >驾驶证</el-button
+            >
+          </el-upload>
+          <img
+            v-if="addressUrls.drive"
+            width="100"
+            height="100"
+            :src="addressUrls.drive"
+            alt=""
+          />
+        </div>
+        <div>
+          <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="uploadSuccessHandleway"
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button class="upload" size="small" type="primary"
+              >道路运营证</el-button
+            >
+          </el-upload>
+          <img
+            v-if="addressUrls.way"
+            width="100"
+            height="100"
+            :src="addressUrls.way"
+            alt=""
+          />
+        </div>
+        <div>
+          <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="uploadSuccessHandlequalification"
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button class="upload" size="small" type="primary"
+              >从业资格证</el-button
+            >
+          </el-upload>
+          <img
+            v-if="addressUrls.qualification"
+            width="100"
+            height="100"
+            :src="addressUrls.qualification"
+            alt=""
+          />
+        </div>
+        <div>
+          <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="uploadSuccessHandleidentityjust"
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button class="upload" size="small" type="primary"
+              >身份证正面</el-button
+            >
+          </el-upload>
+          <img
+            v-if="addressUrls.identityjust"
+            width="100"
+            height="100"
+            :src="addressUrls.identityjust"
+            alt=""
+          />
+        </div>
+        <div>
+          <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="uploadSuccessHandleidentityagainst"
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button class="upload" size="small" type="primary"
+              >身份证反面</el-button
+            >
+          </el-upload>
+          <img
+            v-if="addressUrls.identityagainst"
+            width="100"
+            height="100"
+            :src="addressUrls.identityagainst"
+            alt=""
+          />
+        </div>
       </div>
     </ws-form>
     <!-- 提交 -->
@@ -615,22 +669,23 @@ export default {
         })
     },
     uploadSuccessHandletravel(e) {
-      this.addressUrls.travel = e.url
+      this.$set(this.addressUrls, 'travel', e.url)
     },
     uploadSuccessHandledrive(e) {
-      this.addressUrls.drive = e.url
+      this.$set(this.addressUrls, 'drive', e.url)
     },
     uploadSuccessHandleway(e) {
+      this.$set(this.addressUrls, 'way', e.url)
       this.addressUrls.way = e.url
     },
     uploadSuccessHandlequalification(e) {
-      this.addressUrls.qualification = e.url
+      this.$set(this.addressUrls, 'qualification', e.url)
     },
     uploadSuccessHandleidentityjust(e) {
-      this.addressUrls.identityjust = e.url
+      this.$set(this.addressUrls, 'identityjust', e.url)
     },
     uploadSuccessHandleidentityagainst(e) {
-      this.addressUrls.identityagainst = e.url
+      this.$set(this.addressUrls, 'identityagainst', e.url)
     },
     selectbankDepositBranch(e, index) {
       this.freightspace1[index].bankDepositBranch = e

+ 133 - 13
src/views/tranManagement/tranManagementDriverEdit.vue

@@ -396,19 +396,120 @@
       :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>
+          <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="uploadSuccessHandletravel"
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button class="upload" size="small" type="primary"
+              >行驶证</el-button
+            >
+          </el-upload>
+          <img
+            v-show="addressUrls.travel"
+            width="100"
+            height="100"
+            :src="addressUrls.travel"
+            alt=""
+          />
+        </div>
+        <div>
+          <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="uploadSuccessHandledrive"
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button class="upload" size="small" type="primary"
+              >驾驶证</el-button
+            >
+          </el-upload>
+          <img
+            v-if="addressUrls.drive"
+            width="100"
+            height="100"
+            :src="addressUrls.drive"
+            alt=""
+          />
+        </div>
+        <div>
+          <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="uploadSuccessHandleway"
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button class="upload" size="small" type="primary"
+              >道路运营证</el-button
+            >
+          </el-upload>
+          <img
+            v-if="addressUrls.way"
+            width="100"
+            height="100"
+            :src="addressUrls.way"
+            alt=""
+          />
+        </div>
+        <div>
+          <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="uploadSuccessHandlequalification"
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button class="upload" size="small" type="primary"
+              >从业资格证</el-button
+            >
+          </el-upload>
+          <img
+            v-if="addressUrls.qualification"
+            width="100"
+            height="100"
+            :src="addressUrls.qualification"
+            alt=""
+          />
+        </div>
+        <div>
+          <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="uploadSuccessHandleidentityjust"
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button class="upload" size="small" type="primary"
+              >身份证正面</el-button
+            >
+          </el-upload>
+          <img
+            v-if="addressUrls.identityjust"
+            width="100"
+            height="100"
+            :src="addressUrls.identityjust"
+            alt=""
+          />
+        </div>
+        <div>
+          <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="uploadSuccessHandleidentityagainst"
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button class="upload" size="small" type="primary"
+              >身份证反面</el-button
+            >
+          </el-upload>
+          <img
+            v-if="addressUrls.identityagainst"
+            width="100"
+            height="100"
+            :src="addressUrls.identityagainst"
+            alt=""
+          />
+        </div>
       </div>
     </ws-form>
     <!-- 提交 -->
@@ -620,6 +721,25 @@ export default {
           }
         })
     },
+    uploadSuccessHandletravel(e) {
+      this.$set(this.addressUrls, 'travel', e.url)
+    },
+    uploadSuccessHandledrive(e) {
+      this.$set(this.addressUrls, 'drive', e.url)
+    },
+    uploadSuccessHandleway(e) {
+      this.$set(this.addressUrls, 'way', e.url)
+      this.addressUrls.way = e.url
+    },
+    uploadSuccessHandlequalification(e) {
+      this.$set(this.addressUrls, 'qualification', e.url)
+    },
+    uploadSuccessHandleidentityjust(e) {
+      this.$set(this.addressUrls, 'identityjust', e.url)
+    },
+    uploadSuccessHandleidentityagainst(e) {
+      this.$set(this.addressUrls, 'identityagainst', e.url)
+    },
     // 关闭 dialog时 处理文件url 初始化upload组件
     handleClose() {
       this.dialogViewSpareMoney = false

+ 919 - 0
src/views/tranManagement/tranManagementLook.vue

@@ -0,0 +1,919 @@
+// 运输查看
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">查看运输任务</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="revert()"
+          ><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" :model="deptBudgetList" :rules="rules">
+      <div class="basicInformation">
+        <ws-info-table>
+         <!--任务编号-->
+          <ws-form-item label="任务编号" span="1" prop="grossWeight">
+            <ws-input
+              @input="grossWeightchange"
+              v-model="deptBudgetList.grossWeight"
+              placeholder="请输入任务编号"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!--合同编号(选填)-->
+          <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"
+            prop="tare"
+            class="readonly"
+          >
+            <ws-input
+              @input="tarechange"
+              v-model="deptBudgetList.tare"
+              placeholder="请输入货名"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!-- 重量(吨) -->
+          <ws-form-item label="重量(吨)" span="1" prop="grossWeight">
+            <ws-input
+              @input="grossWeightchange"
+              v-model="deptBudgetList.grossWeight"
+              placeholder="请输入重量(吨)"
+              maxlength="20"
+              size="small"
+            />
+            
+          </ws-form-item>
+
+        </ws-info-table>
+        <div class="inspector">
+            <!-- 始发地 -->
+              <ws-form-item label="始发地" span="1" prop="netWeight">
+            <ws-input
+              readonly="readonly"
+              v-model="deptBudgetList.netWeight"
+              placeholder="请输入始发地"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--终到地-->
+          <ws-form-item label="终到地" span="1" prop="netWeight">
+            <ws-input
+              readonly="readonly"
+              v-model="deptBudgetList.netWeight"
+              placeholder="请输入始发地"
+              maxlength="120"
+              size="small"
+            />
+            </ws-form-item>
+            <span class="zi">运输方式</span>
+           <el-checkbox-group v-model="checkList"> 
+          <el-checkbox label="汽运"></el-checkbox>
+          <el-checkbox label="火运"></el-checkbox>
+          <el-checkbox label="船运"></el-checkbox>
+        </el-checkbox-group>
+          </div>
+      </div>
+      <div class="driver">运输阶段-{{index + 1}}</div>
+     <div class="neifor">
+        <ws-info-table class="el-table">
+          <!--运输方式-->
+          <ws-form-item label="运输方式" span="1" prop="waterContent">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.waterContent"
+              placeholder="请输入运输方式"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货日期-->
+          <ws-form-item label="发货日期" span="1" prop="impurity">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.impurity"
+              placeholder="请输入发货日期"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--最晚到货日期-->
+          <ws-form-item label="最晚到货日期" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
+              placeholder="请输入最晚到货日期"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+      <!-- </div>
+      <div class="nei"> -->
+         <ws-info-table>
+          <!--发货日期-->
+          <ws-form-item label="发货地区" span="1" prop="waterContent">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.waterContent"
+              placeholder="请输入发货地区"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货地详细地址-->
+          <ws-form-item label="发货地详细地址" span="1" prop="impurity">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.impurity"
+              placeholder="请输入发货地详细地址"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货人-->
+          <ws-form-item label="发货人" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
+              placeholder="请输入发货人"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货人电话-->
+          <ws-form-item label="发货人电话" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
+              placeholder="请输入发货人电话"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+      </div>
+      <div class="nei">
+         <ws-info-table>
+          <!--发货日期-->
+          <ws-form-item label="收货地区" span="1" prop="waterContent">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.waterContent"
+              placeholder="请输入收货地区"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货地详细地址-->
+          <ws-form-item label="收货地详细地址" span="1" prop="impurity">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.impurity"
+              placeholder="请输入收货地详细地址"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货人-->
+          <ws-form-item label="收货人" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
+              placeholder="请输入收货人"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货人电话-->
+          <ws-form-item label="收货人电话" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
+              placeholder="请输入收货人电话"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+        </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
+        >
+      </div>
+    </ws-form>
+  </div>
+</template>
+<script>
+import { pullDown, addstorageputList } from '@/model/warehouse/index'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+// import { dayjs, fmoney, EventBus } from 'base-core-lib'
+import { dayjs, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    // vesselId(val) {
+    //   this.getList()
+    // },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //多选按钮
+      checkList:[],
+      //弹出框
+      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: {},
+      // 提交类型
+      submitType: true,
+      storageType: [],
+      readonly: true,
+      appendixIdsAdd: '',
+      uploadSuccess: {},
+      onChange: {},
+      gradeList: [],
+      rules: {
+        netWeight: [
+          {
+            required: true,
+            type: 'number',
+            message: '请输入活动名称',
+            trigger: 'blur',
+          },
+        ],
+      },
+      size: 10,
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      packtypeList: {},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      contractList: [],
+      deptBudgetList: {
+        warehouseInOutDetail: {},
+      },
+      historyList: [],
+
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      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,)
+  },
+  methods: {
+
+    //返回按钮
+    revert() {
+      this.$router.push({ path: 'tranManagementTransport' })
+    },
+    //提交按钮
+    submit() {
+      if (!this.deptBudgetList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if(!this.deptBudgetList.grossWeight){
+         this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.grossWeight < 0 ||
+        this.deptBudgetList.grossWeight > 10000 ||
+        (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.grossWeight).length -
+            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.tare){
+         this.$message({
+          message: '皮重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.tare < 0 ||
+        this.deptBudgetList.tare > 10000 ||
+        (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+          String(this.deptBudgetList.tare).length -
+            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.agent){
+         this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.agent.length < 2 ||
+        this.deptBudgetList.agent.length > 10
+      ) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.carNo){
+         this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.contractNo){
+         this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractNo.length < 6 ||
+        this.deptBudgetList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6-20个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+
+      
+      if(this.deptBudgetList.netWeight > this.$route.query.capacity){
+        this.$message({
+          message: '入库量大于该仓库容量!',
+          type: 'warning',
+        })
+        return
+      }
+      this.$confirm(`确定提交入库信息`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            if (valid) {
+              this.deptBudgetList.compId = sessionStorage.getItem(
+                'ws-pf_compId'
+              )
+              this.deptBudgetList.inOutFlag = 2
+              this.deptBudgetList.statusFlag = 3
+              addstorageputList(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('添加成功')
+                  this.$router.push({ path: 'warehouseManagementList' })
+                })
+            } else {
+              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    temporaryStorage() {
+       if (!this.deptBudgetList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if(!this.deptBudgetList.grossWeight){
+         this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.grossWeight < 0 ||
+        this.deptBudgetList.grossWeight > 10000 ||
+        (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.grossWeight).length -
+            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.tare){
+         this.$message({
+          message: '皮重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.tare < 0 ||
+        this.deptBudgetList.tare > 10000 ||
+        (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+          String(this.deptBudgetList.tare).length -
+            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.agent){
+         this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.agent.length < 2 ||
+        this.deptBudgetList.agent.length > 10
+      ) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.carNo){
+         this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.contractNo){
+         this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractNo.length < 6 ||
+        this.deptBudgetList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6-20个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+       if(this.deptBudgetList.netWeight > this.$route.query.capacity){
+        this.$message({
+          message: '入库量大于该仓库容量!',
+          type: 'warning',
+        })
+        return
+      }
+      this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            if (valid) {
+              this.deptBudgetList.compId = sessionStorage.getItem(
+                'ws-pf_compId'
+              )
+              this.deptBudgetList.inOutFlag = 2
+              this.deptBudgetList.statusFlag = 1
+              addstorageputList(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('暂存成功')
+                  this.$router.push({ path: 'warehouseManagementList' })
+                })
+            } else {
+              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    tarechange(e) {
+      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
+        this.deptBudgetList.netWeight = Number(
+          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+        )
+      }
+    },
+    grossWeightchange(e) {
+      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
+        this.deptBudgetList.netWeight = Number(
+          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+        )
+      }
+    },
+    selectgoodsName(e) {
+      for (var i = 0; i < this.goodnameList.length; i++) {
+        if (this.goodnameList[i].constValue == e) {
+          this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+        }
+      }
+    },
+    selectpackingMethod(e) {
+      for (var i = 0; i < this.packtypeList.length; i++) {
+        if (this.packtypeList[i].constValue == e) {
+          this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+        }
+      }
+    },
+    selectstorageType(e) {
+      for (var i = 0; i < this.storageType.length; i++) {
+        if (this.storageType[i].constValue == e) {
+          this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
+        }
+      }
+    },
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    getList() {
+      // 货名
+      pullDown({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = response
+        })
+      // 品级
+      pullDown({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      // 类型
+      pullDown({ constId: 'CON5' })
+        .toPromise()
+        .then((response) => {
+          this.storageType = response
+        })
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    fujian(row) {
+      if (
+        row.receiveAttachmentPath === null ||
+        row.receiveAttachmentPath === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.receiveAttachmentPath
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    // handleCloe() {
+    //   this.dialogViewSpareMoney = false
+    // },
+    // history(row) {
+    //   billoperatehis({ id: row.id })
+    //     .toPromise()
+    //     .then((response) => {
+    //       this.historyList = response
+    //     })
+    // },
+    // deletecontract(){},
+    //删除
+    approve() {},
+    listQuery() {},
+  },
+}
+</script>
+<style lang="scss" scoped>
+/deep/.basicInformation {
+  .ws-info-table {
+    border: none;
+  }
+  .el-form-item {
+    width: 33.3333%;
+    border: none;
+    .el-form-item__label {
+      background: transparent;
+      border: none;
+    }
+    .el-form-item__content {
+      border: none;
+    }
+  }
+}
+.title {
+  position: relative;
+  padding-left: 10px;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-form {
+  padding: 0 10%;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+.bg-right {
+  text-align: right;
+  padding: 16px 20px;
+}
+.center {
+  position: relative;
+  top: 50px;
+  width: 40%;
+  height: 2000px;
+  margin: 0 auto;
+}
+/deep/.el-form-item__label {
+  width: 160px;
+}
+//选填
+/deep/.el-form-item {
+  width: 50%;
+}
+.container {
+  overflow: scroll;
+  height: 120vh;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  text-align: center;
+}
+.deliverydate {
+  display: inline-block;
+  width: 10%;
+}
+.center {
+  margin-top: -60px;
+  width: 80%;
+}
+//仓位
+
+.position{
+background: #AFB5CB;
+border-radius: 2px;
+font-size: 12px;
+color: #FFFFFF;
+line-height: 20px;
+display: inline-grid;
+padding: 2px 4px;
+}
+// .position {
+//   width: 52px;
+//   height: 20px;
+//   background: #afb5cb;
+//   border-radius: 2px;
+//   font-size: 12px;
+//   font-family: PingFangSC-Medium, PingFang SC;
+//   color: #ffffff;
+//   line-height: 20px;
+// }
+//表格文字
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  text-align: left;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #8890b1;
+  line-height: 16px;
+}
+//始终地
+.inspector .el-form-item__content {
+  text-align: left;
+  margin-left: 0px;
+  margin-top: -4px;
+}
+.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;
+  padding: 4px 2px;
+}
+//下面列表
+// .neifor {
+//   width: 80%;
+//   background-color: #f6f7fc;
+// }
+// /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
+//   width: 35%;
+//   text-align: center;
+// }
+// /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
+//   width: 60%;
+//   background-color: #f6f7fc;
+// }
+
+// /deep/.neifor .el-input--small .el-input__inner{
+//   width: 100%;
+// }
+.inspector  {
+  text-align: left;
+  margin-left: -350px;
+  // margin-top: 50px;
+  width: 700px;
+  margin-left: -100px;
+}
+.ws-info-table .el-form-item{
+  width: 300px;
+}
+//多选
+.el-checkbox-group{
+  margin-left: 160px;
+  margin-top: -20px;
+}
+.zi{
+  margin-left: 100px;
+}
+//底部表格
+/deep/.nei {
+  .ws-info-table {
+    border: none;
+  }
+  .el-form-item {
+    // width: 33.3333%;
+    border: none;
+    .el-form-item__label {
+      background: transparent;
+      border: none;
+    }
+    .el-form-item__content {
+      border: none;
+    }
+  }
+}
+/deep/.neifor {
+  .ws-info-table {
+    border: none;
+  }
+  .el-form-item {
+    // width: 33.3333%;
+    border: none;
+    .el-form-item__label {
+      background: transparent;
+      border: none;
+    }
+    .el-form-item__content {
+      border: none;
+    }
+  }
+}
+</style>

+ 461 - 135
src/views/tranManagement/tranManagementTransport.vue

@@ -1,123 +1,271 @@
-// 运输管理
+<!--运输任务-->
 <template>
   <div>
     <BaseHeaderLayout :leftSpan="20">
-      <template slot="right">
-          <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
-              v-model="deptBudgetList.agent"
-              placeholder="请输入终点"
-              maxlength="100"
-              size="small"
-            />
-          </ws-form-item>
+     <template slot="right">
+        <ws-button
+        class="but"
+          type="primary"
+          @click="handleAdd()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          >添加</ws-button
+        >
+      </template>
+      <template slot="left">
+        <ws-button
+        class="but"
+          type="primary"
+          @click="handleAdd()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          >
+          执行中</ws-button
+        >
+        <ws-button
+        class="but"
+          @click="handleLook()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          >已完成</ws-button
+        >
+        <ws-button
+        class="but"
+          @click="handleEdit()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          >全部任务</ws-button
+        >
+        
+      </template>
+      <template slot="left">
           <ws-input
+          label="起点"
+         
+          placeholder="请输入起点"
+          clearable
+          maxlength="200"
+          type="input"
+          class="find"
+        ></ws-input>
+        
+        <ws-input
+        label="终点"
+          
+          placeholder="请输入终点"
+          clearable
+          maxlength="200"
+          type="input"
+          class="find"
+        ></ws-input>
+        <ws-input
           v-model="warehouseName"
-          placeholder="请输入仓库名"
+          placeholder="可按合同编号或运输任务编号查找"
           clearable
           maxlength="500"
           type="input"
           class="findValue"
         ></ws-input>
-       <ws-button
+        <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+        <div class="search">
+            <ws-button
+          class="find"
           type="primary"
-          @click="handleLook()"
+          @click="lookUp()"
           v-hasPermission="
             `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
           "
-          >查找</ws-button
-        >
-      </template>
-      <template slot="left">
-        
+          ><img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
+        </div>
         
       </template>
     </BaseHeaderLayout>
-    <div class="connert">
+    <div>
       <el-table
         class="wenzi"
-        :data="driverList.records"
+        :data="gainList"
         style="width: 100%; margin-top: 20px"
-        fit
         height="780"
       >
-        <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="driverName" label="姓名" width="100">
+        <el-table-column prop="index" label="序号" width="80">
         </el-table-column>
-        <el-table-column prop="numberCard" label="运输任务编号" width="200">
+        <el-table-column prop=" taskNo" label="运输任务编号" width="80">
         </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=" contractNo" 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 prop="binNumber" label="运输方式" width="120">
+        <el-table-column prop=" weight" class="table_td" label="货物(吨数)" >
+          <!-- <template slot-scope="scope">
+            <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
+              {{ item.inNetWeight }}
+            </div>
+          </template> -->
         </el-table-column>
-        <el-table-column prop="carModel" label="起点" width="80">
+        <el-table-column class="table_td" label="运输方式">
+          <!-- <template slot-scope="scope">
+            <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
+              {{ item.outNetWeight }}
+            </div>
+          </template> -->
         </el-table-column>
-        <el-table-column prop="carLength" label="当前中转" width="80">
+        <el-table-column prop=" start" class="table_td" label="起点">
+          <!-- <template slot-scope="scope">
+            <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
+              {{ item.storage }}
+            </div>
+          </template> -->
         </el-table-column>
-         <el-table-column prop="carLength" label="终点" width="80">
+        <el-table-column prop="currentTransferAddress" class="table_td" label="当前中转">
+          <!-- <template slot-scope="scope">
+            <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
+              {{ item.storage }}
+            </div>
+          </template> -->
         </el-table-column>
-         <el-table-column prop="carLength" label="状态" width="80">
+        <el-table-column prop="end" class="table_td" label="终点">
+          <!-- <template slot-scope="scope"> -->
+            <!-- <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
+              {{ item.storage }}
+            </div> -->
+          <!-- </template> -->
         </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
+
+      <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)"
           >
-          <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
-          >
-          <!-- </template> -->
+          <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">操作历史</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>
+          </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="seller" label="操作" width="300">
+          <template slot-scope="scope">
+            <ws-button
+              class="completed"
+              @click="nocomplete(scope.row)"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+            >
+              查看
+            </ws-button>
+            <ws-button
+              class="putstorage"
+              @click="warehousing(scope.row)"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+            >
+              编辑
+            </ws-button>
+            <ws-button
+              class="deliverystorage"
+              @click="delivery(scope.row)"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+            >
+              删除
+            </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>
-      <el-pagination
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :current-page="currentPage"
-        :page-size="deptCircularPage.pageSize"
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="deptBudgetTotal"
-      >
-      </el-pagination>
     </div>
   </div>
 </template>
 <script>
-import { selectDriver, billoperatehis } from '@/model/transport/index'
+import {
+  gain,
+} from '@/model/transport/index'
+import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
-// provinceAndCityData省市二级
-import { provinceAndCityData, CodeToText } from 'element-china-area-data'
 import WsUpload from '@/components/WsUpload'
 import { dayjs, fmoney, EventBus } from 'base-core-lib'
 export default {
@@ -139,34 +287,29 @@ export default {
       //弹出框
       dialogViewSpareMoney: false,
       dialogApproveFormVisible: false,
-      options_: provinceAndCityData,
+      // 船舶类型
+      monetaryKey: null,
       // 表格显示数据
       tableDate: [],
+
       // 是否显示
       showType: true,
       // 年
       year: '',
-      deptBudgetTotal: 0,
+     gainList:[],
       currentPage: 1,
       pageSize: 10,
       searchType: 1,
+      searchTypeText: '未完成',
       searchKeyWord: '',
       contractType: 2,
-      startDate: null,
-      endDate: null,
-      searchTypeText: '',
       // 提交类型
       submitType: true,
       size: 10,
       spanArr: [],
+      warehouseName: '',
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
-      date: {
-        year: dayjs().format('YYYY'),
-        month: dayjs().format('MM'),
-      },
-      driverList: [],
-      deptBudgetList: {},
       historyList: [],
       pickerBeginDateBefore: {
         disabledDate: (time) => {
@@ -177,25 +320,141 @@ export default {
     }
   },
   activated() {
+    
     this.getList()
     this.showType = this.isShow
   },
   methods: {
     //查找
+      lookUp(){
+        this.currentPage= 1
+        this.getList()
+      },
+    getList() {
+      gain({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage:this.currentPage,
+        pageSize:this.pageSize,
+        searchType:this.searchType,
+        searchKeyWord:this.searchKeyWord,
+      })
+      .toPromise()
+      .then((response)=>{
+        this.gainList = response
+      })
+    },
+    //编辑
+    delivery(item) {
+      this.$router.push({
+        path: 'tranManagementTransportEdit',
+        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: 'tranManagementLook',
+        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) => {
+        //判断是否是第一项
+
+        // if (index === 0) {
+        //   this.spanArr.push(1)
+        //   this.pos = 0
+        // } else {
+        //不是第一项时,就根据标识去存储
+        if (data[index].warehouseNumViewList.length > 1) {
+          // 查找到符合条件的数据时每次要把之前存储的数据+1
+          this.spanArr[this.pos] = data[index].warehouseNumViewList.length
+          this.spanArr.push(0)
+        } else {
+          // 没有符合的数据时,要记住当前的index
+          this.spanArr.push(1)
+          this.pos = index
+        }
+        // }
+      })
+    },
+    //查看//传参
+    nocomplete(row) {
+      this.$router.push({
+        path: 'tranManagementLook',
+        // 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,
+    //     },
+    //   })
+    // },
+    //盘损
+    // loss(item) {
+    //   this.$router.push({
+    //     path: 'warehouseManagementIoss',
+    //     query: {
+    //       baseId: item.warehouseId,
+    //       positionId: item.binNumberId,
+    //       warehouseName: item.warehouseName,
+    //       binNumber: item.binNumber,
+    //     },
+    //   })
+    // },
+    //查看
     handleLook() {
-      this.currentPage = 1
-      this.getList()
+      this.$router.push({ path: 'tranManagementLook' })
     },
     //添加
     handleAdd() {
-      this.$router.push({ path: 'tranManagementDriverAdd' })
+      this.$router.push({ path: 'tranManagementTransportAdd' })
     },
     //编辑
     handleEdit() {
-      this.$router.push({ path: 'warehouseManagementEdit' })
-    },
-    handleDelete() {
-      this.$router.push({ path: 'warehouseManagementDelete' })
+      this.$router.push({ path: 'tranManagementTransportEdit' })
     },
     dateFormat(fmt, date) {
       let ret
@@ -232,22 +491,6 @@ export default {
       console.log(`当前页: ${val}`)
       this.getList()
     },
-    getList() {
-      selectDriver({
-        compId: sessionStorage.getItem('ws-pf_compId'),
-        currentPage: this.currentPage,
-        pageSize: this.pageSize,
-        searchType: this.searchType,
-        searchKeyWord: this.searchKeyWord,
-      })
-        .toPromise()
-        .then((response) => {
-          this.deptCircularPage.currentPage = response.current
-          this.deptCircularPage.pageSize = response.size
-          this.deptBudgetTotal = response.total
-          this.driverList = response
-        })
-    },
     editClick(row) {
       var status = ''
       if (row.status == '待执行' || row.status == '已完成') {
@@ -280,21 +523,11 @@ export default {
         })
     },
     selecttaskType(e) {
-      this.selectedOptions = e
-    },
-    fujian(row) {
-      if (
-        row.receiveAttachmentPath === null ||
-        row.receiveAttachmentPath === ''
-      ) {
-        EventBus.$emit(
-          'warning',
-          this.$t('system.noticeCircular.NoInformation')
-        )
-      } else {
-        this.accessoryTFs = true
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
       }
-      this.appendixIdss = row.receiveAttachmentPath
     },
     handleExamine(row) {
       this.$router.push({
@@ -307,7 +540,6 @@ export default {
       this.dialogViewSpareMoney = false
     },
     history(row) {
-      console.log(row)
       billoperatehis({ id: row.id })
         .toPromise()
         .then((response) => {
@@ -315,11 +547,32 @@ export default {
         })
     },
     find() {
-      this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
-      this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
       this.currentPage = 1
       this.getList()
     },
+    async exportlist() {
+      const { data } = await export1(
+        {
+          compId: sessionStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        },
+        {},
+        { responseType: 'blob' }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_采购合同`,
+        type: 'xls',
+      })
+    },
   },
 }
 </script>
@@ -332,7 +585,80 @@ export default {
   width: 62px;
   text-align: right;
 }
-.findValue {
-  margin: 0 10px;
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--default {
+  color: #8890b1;
+  border-color: #e8eaf1;
+}
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
+  width: 30px;
+  margin-left: 0;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+}
+/deep/.findValue .el-input__inner {
+  border-top-right-radius: 0px;
+  border-bottom-right-radius: 0px;
+}
+.completed.el-button--default {
+  border-color: #5878e8;
+  background-color: #f6f7fc;
+  color: #5878e8;
+}
+.putstorage.el-button--default,
+.deliverystorage.el-button--default {
+  border-color: #8890b1;
+  background-color: #fff;
+  color: #8890b1;
+}
+/deep/.el-table td,
+/deep/.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+}
+/deep/.el-table tr td:first-child,
+/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;
+}
+.base_header_layout .grid-content{
+    margin-top: 80px;
+}
+.but{
+    margin-top: 150px;
+}
+.findValue{
+    width: 50%;
+    margin-left: 25%;
+}
+/deep/.el-input--small .el-input__inner{
+  margin-left: -230px;
+   width: 300px;
+}
+.search{
+  margin-left: -100px;
 }
+
 </style>

+ 853 - 0
src/views/tranManagement/tranManagementTransportAdd.vue

@@ -0,0 +1,853 @@
+// 创建运输任务
+<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
+        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="taskNo"
+              class="forlist"
+              width="400px"
+            >
+              <ws-input
+                v-model="item.taskNo"
+                placeholder="请输入任务编号"
+                maxlength="20"
+                size="small"
+              />
+            </ws-form-item>
+            <!-- 任务类型 -->
+          <ws-form-item prop="taskType" label="任务类型" span="1">
+            <ws-select
+              v-model="taskType"
+              placeholder=""
+              class="typeselect"
+              @change="selectstorageType"
+            >
+              <ws-option
+                v-for="item in storageType"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+          <!-- 合同编号 -->
+          <ws-form-item prop="contractNo" label="合同编号" span="1">
+            <ws-select
+              v-model="contractNo"
+              placeholder="请输入合同编号"
+              class="typeselect"
+              @change="selectstorageType"
+            >
+              <ws-option
+                v-for="item in storageType"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+          <!-- 货名 -->
+          <ws-form-item prop="goodsName" label="货名" span="1">
+            <ws-select
+              v-model="deptBudgetList.goodsName"
+              placeholder=""
+              class="typeselect"
+              @change="selectgoodsName"
+            >
+              <ws-option
+                v-for="item in goodnameList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+            </ws-form-item>
+            <!--重量(吨)-->
+          <ws-form-item label="重量(吨)" span="1" prop="weight">
+            <ws-input
+              @input="grossWeightchange"
+              v-model="deptBudgetList.weight"
+              placeholder="请输入重量"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          </ws-info-table>
+        </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">
+          <ws-info-table class="el-table">
+            <el-radio v-model="item.radio" label="1">只有库发货</el-radio>
+              <el-radio v-model="item.radio" label="2">临时库发货</el-radio>
+            <!-- <ws-form-item label="" span="1"> -->
+            <ws-select
+              v-model="deptBudgetList.inOutType"
+              placeholder=""
+              class="typeselect"
+              @change="selectstorageType"
+            >
+              <ws-option
+                v-for="item in storageType"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+            
+          <!-- </ws-form-item> -->
+            <!--始发地-->
+            <ws-form-item label="始发地" span="1">
+            <ws-select
+              v-model="deptBudgetList.inOutType"
+              placeholder=""
+              class="typeselect"
+              @change="selectstorageType"
+            >
+              <ws-option
+                v-for="item in storageType"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+            <!--始发地详细地址-->
+            <ws-form-item
+            label="始发地详细地址"
+            span="1"
+            prop="startDetailedAddress"
+            class="readonly bg-right"
+          >
+            <ws-input
+              v-model="deptBudgetList.driverName"
+              placeholder="请输入始发地详细地址"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+        
+          <ws-form-item prop="receiveWarehouse" label="" span="10"></ws-form-item>
+          <!-- 收获库点 -->
+            <ws-form-item
+            label="收获库点"
+            span="1"
+            prop="contractNo"
+            class="readonly bg-right"
+          >
+           <ws-select
+              v-model="deptBudgetList.inOutType"
+              placeholder=""
+              class="typeselect"
+              @change="selectstorageType"
+            >
+              <ws-option
+                v-for="item in storageType"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+          
+          <!-- 终到地 -->
+           <ws-form-item
+            label="终到地"
+            span="1"
+            prop="contractNo"
+            class="readonly bg-right"
+          >
+            <ws-select
+              v-model="deptBudgetList.inOutType"
+              placeholder=""
+              class="typeselect"
+              @change="selectstorageType"
+            >
+              <ws-option
+                v-for="item in storageType"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+          <!-- 终到地详细地址 -->
+              <ws-form-item
+            label="终到地详细地址"
+            span="1"
+            prop="endDetailedAddress"
+            class="readonly bg-right"
+          >
+            <ws-input
+              v-model="deptBudgetList.endDetailedAddress"
+              placeholder="请输入始发地详细地址"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          </ws-info-table>
+        </div>
+         
+      </div>
+    </ws-form>
+    <span class="zi">运输方式</span>
+  <el-checkbox-group v-model="checkList" prop="tranType">
+    <el-checkbox label="汽运" prop="1"></el-checkbox>
+    <el-checkbox label="火运" prop="2"></el-checkbox>
+    <el-checkbox label="船运" prop="3"></el-checkbox>
+  </el-checkbox-group>
+  
+    <ws-form
+      ref="deptBudgetList"
+      :rules="mainReportAdd"
+      :model="deptBudgetList"
+    >
+    <div class="small-title">运输阶段1(123456789)</div>
+    <!--运输方式-->
+    <div class="neifor">
+        <ws-info-table>
+          <!--运输方式-->
+          <ws-form-item label="运输方式" span="1" prop="waterContent">
+            <ws-input
+              v-model="deptBudgetList.waterContent"
+              placeholder="请输入运输方式"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货日期-->
+          <ws-form-item label="发货日期" span="1" prop="impurity">
+            <ws-input
+              v-model="deptBudgetList.impurity"
+              placeholder="请输入发货日期"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--最晚到货日期-->
+          <ws-form-item label="最晚到货日期" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.bulkDensity"
+              placeholder="请输入最晚到货日期"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+      </div>
+       <div class="nei">
+         <ws-info-table>
+          <!--发货地区-->
+          <ws-form-item label="发货地区" span="1" prop="waterContent">
+            <ws-select
+              v-model="deptBudgetList.inOutType"
+              placeholder="请输入发货地区"
+              class="typeselect"
+              @change="selectstorageType"
+            >
+              <ws-option
+                v-for="item in storageType"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+          <!--发货地详细地址-->
+          <ws-form-item label="发货地详细地址" span="1" prop="impurity">
+            <ws-input
+              v-model="deptBudgetList.impurity"
+              placeholder="请输入发货地详细地址"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货人-->
+          <ws-form-item label="发货人" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.bulkDensity"
+              placeholder="请输入发货人"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货人电话-->
+          <ws-form-item label="发货人电话" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.bulkDensity"
+              placeholder="请输入发货人电话"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+      </div>
+      <div class="nei">
+         <ws-info-table>
+          <!--收货日期-->
+          <ws-form-item label="收货地区" span="1" prop="waterContent">
+             <ws-select
+              v-model="deptBudgetList.inOutType"
+              placeholder="请输入收货地区"
+              class="typeselect"
+              @change="selectstorageType"
+            >
+              <ws-option
+                v-for="item in storageType"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+          <!--收货地详细地址-->
+          <ws-form-item label="收货地详细地址" span="1" prop="impurity">
+            <ws-input
+              v-model="deptBudgetList.impurity"
+              placeholder="请输入收货地详细地址"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货人-->
+          <ws-form-item label="收货人" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.bulkDensity"
+              placeholder="请输入收货人"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货人电话-->
+          <ws-form-item label="收货人电话" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.bulkDensity"
+              placeholder="请输入收货人电话"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+        </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 { provinceAndCityData, CodeToText } from 'element-china-area-data'
+
+import {addtrantask} 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 {
+       checkList: [],
+      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: [],
+      freightspace: [
+        {
+          carNumber: '',
+          carModel: '高栏',
+          carModelKey: '1',
+          carLength: '13',
+          carLengthKey: '1',
+          carLoad: '',
+          yearManufacture: '',
+        },
+      ],
+      freightspace1: [
+        {
+          account_type: '',
+          radio: '1',
+          payeeName: '',
+          payeeNumberCard: '',
+          compName: '',
+          bankDeposit: '',
+          bankCard: '',
+        },
+      ],
+      name: '',
+      age: '',
+    }
+  },
+  activated() {
+    this.loaddata()
+    this.showType = this.isShow
+  },
+  computed: {},
+  methods: {
+    addtrantask(){
+
+    },
+    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
+    },
+    loaddata() {
+      // 车型
+      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
+    },
+    // 关闭 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: '',
+      })
+    },
+    del1(index) {
+      if (this.freightspace1.length > 1) {
+        this.freightspace1.splice(index, 1)
+      }
+    },
+    handleChange(value) {
+      this.selectedOptions = value
+    },
+    returnsales() {
+      this.$router.push({ path: 'tranManagementTransport' })
+    },
+    },
+    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%;
+}
+.zi{
+   margin-left: 170px;
+}
+.el-checkbox-group{
+  margin-left: 240px;
+    margin-top: -17px;
+}
+/deep/.neifor {
+  .ws-info-table {
+    border: none;
+  }
+  .el-form-item {
+    // width: 33.3333%;
+    border: none;
+    .el-form-item__label {
+      background: transparent;
+      border: none;
+    }
+    .el-form-item__content {
+      border: none;
+    }
+  }
+}
+/deep/.nei {
+  .ws-info-table {
+    border: none;
+  }
+  .el-form-item {
+    // width: 33.3333%;
+    border: none;
+    .el-form-item__label {
+      background: transparent;
+      border: none;
+    }
+    .el-form-item__content {
+      border: none;
+    }
+  }
+}
+.ws-info-table .el-form-item .el-form-item__label {
+    width: min-content;
+}
+.el-select>.el-input {
+    display: block;
+    width: 190px;
+}
+.ws-info-table .el-form-item {
+    width: 20%;
+    border: none;
+    background: transparent;
+}
+
+</style>

+ 836 - 0
src/views/tranManagement/tranManagementTransportEdit.vue

@@ -0,0 +1,836 @@
+// 编辑运输任务
+<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
+        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">
+            <ws-select
+              v-model="deptBudgetList.inOutType"
+              placeholder=""
+              class="typeselect"
+              @change="selectstorageType"
+            >
+              <ws-option
+                v-for="item in storageType"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+          <!-- 合同编号 -->
+          <ws-form-item label="合同编号" span="1">
+            <ws-select
+              v-model="deptBudgetList.inOutType"
+              placeholder="请输入合同编号"
+              class="typeselect"
+              @change="selectstorageType"
+            >
+              <ws-option
+                v-for="item in storageType"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+          <!-- 货名 -->
+          <ws-form-item label="货名" span="1">
+            <ws-select
+              v-model="deptBudgetList.goodsName"
+              placeholder=""
+              class="typeselect"
+              @change="selectgoodsName"
+            >
+              <ws-option
+                v-for="item in goodnameList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+            </ws-form-item>
+            <!--重量(吨)-->
+          <ws-form-item label="重量(吨)" span="1" prop="grossWeight">
+            <ws-input
+              @input="grossWeightchange"
+              v-model="deptBudgetList.grossWeight"
+              placeholder="请输入重量"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          </ws-info-table>
+        </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">
+          <ws-info-table class="el-table">
+            <el-radio v-model="item.radio" label="1">只有库发货</el-radio>
+              <el-radio v-model="item.radio" label="2">临时库发货</el-radio>
+            <!-- <ws-form-item label="" span="1"> -->
+            <ws-select
+              v-model="deptBudgetList.inOutType"
+              placeholder=""
+              class="typeselect"
+              @change="selectstorageType"
+            >
+              <ws-option
+                v-for="item in storageType"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+            
+          <!-- </ws-form-item> -->
+            <!--始发地-->
+            <ws-form-item label="始发地" span="1">
+            <ws-select
+              v-model="deptBudgetList.inOutType"
+              placeholder=""
+              class="typeselect"
+              @change="selectstorageType"
+            >
+              <ws-option
+                v-for="item in storageType"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+            <!--始发地详细地址-->
+            <ws-form-item
+            label="始发地详细地址"
+            span="1"
+            prop="driverName"
+            class="readonly bg-right"
+          >
+            <ws-input
+              v-model="deptBudgetList.driverName"
+              placeholder="请输入始发地详细地址"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+        
+          <ws-form-item label="" span="10"></ws-form-item>
+          <!-- 收获库点 -->
+            <ws-form-item
+            label="收获库点"
+            span="1"
+            prop="contractNo"
+            class="readonly bg-right"
+          >
+           <ws-select
+              v-model="deptBudgetList.inOutType"
+              placeholder=""
+              class="typeselect"
+              @change="selectstorageType"
+            >
+              <ws-option
+                v-for="item in storageType"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+          
+          <!-- 终到地 -->
+           <ws-form-item
+            label="终到地"
+            span="1"
+            prop="contractNo"
+            class="readonly bg-right"
+          >
+            <ws-select
+              v-model="deptBudgetList.inOutType"
+              placeholder=""
+              class="typeselect"
+              @change="selectstorageType"
+            >
+              <ws-option
+                v-for="item in storageType"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+          <!-- 终到地详细地址 -->
+              <ws-form-item
+            label="终到地详细地址"
+            span="1"
+            prop="driverName"
+            class="readonly bg-right"
+          >
+            <ws-input
+              v-model="deptBudgetList.driverName"
+              placeholder="请输入始发地详细地址"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          </ws-info-table>
+        </div>
+         
+      </div>
+    </ws-form>
+    <span class="zi">运输方式</span>
+  <el-checkbox-group v-model="checkList">
+    <el-checkbox label="汽运"></el-checkbox>
+    <el-checkbox label="火运"></el-checkbox>
+    <el-checkbox label="船运"></el-checkbox>
+  </el-checkbox-group>
+  
+    <ws-form
+      ref="deptBudgetList"
+      :rules="mainReportAdd"
+      :model="deptBudgetList"
+    >
+    <div class="small-title">运输阶段1(123456789)</div>
+    <!--运输方式-->
+    <div class="neifor">
+        <ws-info-table>
+          <!--运输方式-->
+          <ws-form-item label="运输方式" span="1" prop="waterContent">
+            <ws-input
+              v-model="deptBudgetList.waterContent"
+              placeholder="请输入运输方式"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货日期-->
+          <ws-form-item label="发货日期" span="1" prop="impurity">
+            <ws-input
+              v-model="deptBudgetList.impurity"
+              placeholder="请输入发货日期"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--最晚到货日期-->
+          <ws-form-item label="最晚到货日期" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.bulkDensity"
+              placeholder="请输入最晚到货日期"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+      </div>
+       <div class="nei">
+         <ws-info-table>
+          <!--发货日期-->
+          <ws-form-item label="发货地区" span="1" prop="waterContent">
+            <ws-input
+              v-model="deptBudgetList.waterContent"
+              placeholder="请输入发货地区"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货地详细地址-->
+          <ws-form-item label="发货地详细地址" span="1" prop="impurity">
+            <ws-input
+              v-model="deptBudgetList.impurity"
+              placeholder="请输入发货地详细地址"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货人-->
+          <ws-form-item label="发货人" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.bulkDensity"
+              placeholder="请输入发货人"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货人电话-->
+          <ws-form-item label="发货人电话" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.bulkDensity"
+              placeholder="请输入发货人电话"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+      </div>
+      <div class="nei">
+         <ws-info-table>
+          <!--收货日期-->
+          <ws-form-item label="收货地区" span="1" prop="waterContent">
+            <ws-input
+              v-model="deptBudgetList.waterContent"
+              placeholder="请输入收货地区"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--收货地详细地址-->
+          <ws-form-item label="收货地详细地址" span="1" prop="impurity">
+            <ws-input
+              v-model="deptBudgetList.impurity"
+              placeholder="请输入收货地详细地址"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货人-->
+          <ws-form-item label="收货人" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.bulkDensity"
+              placeholder="请输入收货人"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--发货人电话-->
+          <ws-form-item label="收货人电话" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.bulkDensity"
+              placeholder="请输入收货人电话"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+        </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 { provinceAndCityData, CodeToText } from 'element-china-area-data'
+import { packList } from '@/model/contarct/index'
+import { addDriver } 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 {
+       checkList: [],
+      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: [],
+      freightspace: [
+        {
+          carNumber: '',
+          carModel: '高栏',
+          carModelKey: '1',
+          carLength: '13',
+          carLengthKey: '1',
+          carLoad: '',
+          yearManufacture: '',
+        },
+      ],
+      freightspace1: [
+        {
+          account_type: '',
+          radio: '1',
+          payeeName: '',
+          payeeNumberCard: '',
+          compName: '',
+          bankDeposit: '',
+          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
+    },
+    loaddata() {
+      // 车型
+      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
+    },
+    // 关闭 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: '',
+      })
+    },
+    del1(index) {
+      if (this.freightspace1.length > 1) {
+        this.freightspace1.splice(index, 1)
+      }
+    },
+    handleChange(value) {
+      this.selectedOptions = value
+    },
+    returnsales() {
+      this.$router.push({ path: 'tranManagementTransport' })
+    },
+    },
+    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%;
+}
+.zi{
+   margin-left: 170px;
+}
+.el-checkbox-group{
+  margin-left: 240px;
+    margin-top: -17px;
+}
+/deep/.neifor {
+  .ws-info-table {
+    border: none;
+  }
+  .el-form-item {
+    // width: 33.3333%;
+    border: none;
+    .el-form-item__label {
+      background: transparent;
+      border: none;
+    }
+    .el-form-item__content {
+      border: none;
+    }
+  }
+}
+/deep/.nei {
+  .ws-info-table {
+    border: none;
+  }
+  .el-form-item {
+    // width: 33.3333%;
+    border: none;
+    .el-form-item__label {
+      background: transparent;
+      border: none;
+    }
+    .el-form-item__content {
+      border: none;
+    }
+  }
+}
+.ws-info-table .el-form-item .el-form-item__label {
+    width: min-content;
+}
+.el-select>.el-input {
+    display: block;
+    width: 190px;
+}
+.ws-info-table .el-form-item {
+    width: 20%;
+    border: none;
+    background: transparent;
+}
+
+</style>

+ 648 - 0
src/views/tranManagement/tranManagementVehicle.vue

@@ -0,0 +1,648 @@
+//汽运调度
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="20">
+      <template slot="left">
+        <ws-button
+        class="but"
+          type="primary"
+          @click="handleAdd()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          >
+          执行中</ws-button
+        >
+        <ws-button
+        class="but"
+          @click="handleLook()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          >已完成</ws-button
+        >
+        <ws-button
+        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-input
+          v-model="searchKeyWord"
+          placeholder="可按照合同编号、买方名称、卖方名称进行查找"
+          clearable
+          maxlength="500"
+          type="input"
+          class="findValue"
+        ></ws-input>
+        <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+        <ws-button
+          class="find"
+          type="primary"
+          @click="find()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          ><img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
+      </template>
+    </BaseHeaderLayout>
+    <div>
+      <el-table
+        class="wenzi"
+        :data="warehouseList"
+        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>
+        </el-table-column>
+        <el-table-column class="table_td" label="收货">
+          <template slot-scope="scope">
+            <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
+              {{ item.storage }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column class="table_td" label="运输周期">
+          <template slot-scope="scope">
+            <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
+              {{ item.storage }}
+            </div>
+          </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="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 }}
+                </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 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>
+            <ws-button
+              class="putstorage"
+              @click="warehousing(scope.row)"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+            >
+              派车
+            </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'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+import { dayjs, fmoney, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    vesselId(val) {
+      this.getList()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      currentPage: 1,
+      pageSize: 10,
+      searchType: 1,
+      searchTypeText: '未完成',
+      searchKeyWord: '',
+      contractType: 2,
+      // 提交类型
+      submitType: true,
+      size: 10,
+      spanArr: [],
+      warehouseName: '',
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      warehouseList: [],
+      deptBudgetList: {},
+      historyList: [],
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+    }
+  },
+  activated() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.getList()
+    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) => {
+        //判断是否是第一项
+
+        // if (index === 0) {
+        //   this.spanArr.push(1)
+        //   this.pos = 0
+        // } else {
+        //不是第一项时,就根据标识去存储
+        if (data[index].warehouseNumViewList.length > 1) {
+          // 查找到符合条件的数据时每次要把之前存储的数据+1
+          this.spanArr[this.pos] = data[index].warehouseNumViewList.length
+          this.spanArr.push(0)
+        } else {
+          // 没有符合的数据时,要记住当前的index
+          this.spanArr.push(1)
+          this.pos = index
+        }
+        // }
+      })
+    },
+    //查看//传参
+    nocomplete(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,
+        },
+      })
+    },
+    //盘损
+    loss(item) {
+      this.$router.push({
+        path: 'warehouseManagementIoss',
+        query: {
+          baseId: item.warehouseId,
+          positionId: item.binNumberId,
+          warehouseName: item.warehouseName,
+          binNumber: item.binNumber,
+        },
+      })
+    },
+    //查看
+    handleLook() {
+      this.$router.push({ path: '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 = {
+        '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')
+          )
+        }
+      }
+      return fmt
+    },
+    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() {
+      getList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        warehouseName: this.warehouseName,
+      })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList = response
+        })
+    },
+    editClick(row) {
+      var status = ''
+      if (row.status == '待执行' || row.status == '已完成') {
+        status = '执行中'
+      } else if (row.status == '执行中') {
+        status = '已完成'
+      }
+      //cancelButtonClass: "btn-custom-cancel"
+      this.$confirm(`是否将状态改为${status}`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          editstatus({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '状态修改成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    fujian(row) {
+      if (
+        row.receiveAttachmentPath === null ||
+        row.receiveAttachmentPath === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.receiveAttachmentPath
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    history(row) {
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    find() {
+      this.currentPage = 1
+      this.getList()
+    },
+    async exportlist() {
+      const { data } = await export1(
+        {
+          compId: sessionStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        },
+        {},
+        { responseType: 'blob' }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_采购合同`,
+        type: 'xls',
+      })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.connert {
+  width: 90%;
+  margin: 0 auto;
+}
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--default {
+  color: #8890b1;
+  border-color: #e8eaf1;
+}
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
+  width: 30px;
+  margin-left: 0;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+}
+/deep/.findValue .el-input__inner {
+  border-top-right-radius: 0px;
+  border-bottom-right-radius: 0px;
+}
+.completed.el-button--default {
+  border-color: #5878e8;
+  background-color: #f6f7fc;
+  color: #5878e8;
+}
+.putstorage.el-button--default,
+.deliverystorage.el-button--default {
+  border-color: #8890b1;
+  background-color: #fff;
+  color: #8890b1;
+}
+/deep/.el-table td,
+/deep/.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+}
+/deep/.el-table tr td:first-child,
+/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;
+}
+.base_header_layout .grid-content{
+    margin-top: 80px;
+}
+.but{
+    margin-top: 150px;
+}
+.el-input--small .el-input__inner{
+    margin-left: 20px;
+}
+.el-range-editor--small.el-input__inner {
+    height: 32px;
+    margin-left: -20%;
+}
+</style>

+ 909 - 0
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -0,0 +1,909 @@
+// 汽车调度
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">汽车调度</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="revert()"
+          ><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" :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-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"
+          />
+          </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
+              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="inspector">
+        <!--自检员-->
+        <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
+          <ws-input
+            v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
+            placeholder="请输入质检员姓名"
+            maxlength="120"
+            size="small"
+          />
+        </ws-form-item>
+      </div>  -->
+
+      <div class="neifor">
+        <ws-info-table>
+          <!--司机-->
+          <ws-form-item label="司机" span="1" prop="waterContent">
+            <ws-select
+                v-model="deptBudgetList.waterContent"
+                placeholder="请选择司机"
+                @class="typeselect"
+                @change="selectwaterContent"
+            ></ws-select>
+          </ws-form-item>
+          <!--司机电话-->
+          <ws-form-item label="司机电话" span="1" prop="impurity">
+            <ws-select
+                v-model="deptBudgetList.impurity"
+                placeholder="请选择司机司机电话"
+            ></ws-select>
+          </ws-form-item>
+          <!--车牌号-->
+          <ws-form-item label="车牌号" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.bulkDensity"
+              placeholder=""
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--车型-->
+          <ws-form-item label="车型" span="1" prop="mildewGrain">
+            <ws-input
+              v-model="deptBudgetList.mildewGrain"
+              placeholder="请输入高栏"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--车长-->
+          <ws-form-item label="车长" span="1" prop="jiaorenli">
+            <ws-input
+              v-model="deptBudgetList.jiaorenli"
+              placeholder="请输入车长"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--载重吨-->
+          <ws-form-item label="载重(吨)" span="1" prop="imperfectGrain">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
+              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=""
+          />
+      </div>
+      
+      <el-button
+          class="add"
+          type="primary"
+          size="small"
+          @click="add1"
+          >添加司机</el-button
+        >
+      <div style="text-align: right; padding: 10px">
+        
+        <el-button
+          class="bg-bottom-up"
+          type="primary"
+          size="small"
+          @click="submit()"
+          >提交</el-button
+        >
+      </div>
+    </ws-form>
+  </div>
+</template>
+<script>
+import { pullDown, addstorageputList } from '@/model/warehouse/index'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+// import { dayjs, fmoney, EventBus } from 'base-core-lib'
+import { dayjs, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    // vesselId(val) {
+    //   this.getList()
+    // },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  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: {},
+      // 提交类型
+      submitType: true,
+      storageType: [],
+      readonly: true,
+      appendixIdsAdd: '',
+      uploadSuccess: {},
+      onChange: {},
+      gradeList: [],
+      rules: {
+        netWeight: [
+          {
+            required: true,
+            type: 'number',
+            message: '请输入活动名称',
+            trigger: 'blur',
+          },
+        ],
+      },
+      size: 10,
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      packtypeList: {},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      contractList: [],
+      deptBudgetList: {
+        warehouseInOutDetail: {},
+      },
+      historyList: [],
+
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      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,)
+  },
+  methods: {
+    //返回按钮
+    revert() {
+      this.$router.push({ path: 'tranManagementVehicle' })
+    },
+    del(index){
+        if(this.freightspace.length > 1 ){
+            this.freightspace.splice(index,1)
+        }
+    },
+    //提交按钮
+    submit() {
+      if (!this.deptBudgetList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if(!this.deptBudgetList.grossWeight){
+         this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.grossWeight < 0 ||
+        this.deptBudgetList.grossWeight > 10000 ||
+        (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.grossWeight).length -
+            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.tare){
+         this.$message({
+          message: '皮重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.tare < 0 ||
+        this.deptBudgetList.tare > 10000 ||
+        (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+          String(this.deptBudgetList.tare).length -
+            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.agent){
+         this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.agent.length < 2 ||
+        this.deptBudgetList.agent.length > 10
+      ) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.carNo){
+         this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.contractNo){
+         this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractNo.length < 6 ||
+        this.deptBudgetList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6-20个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+
+      
+      if(this.deptBudgetList.netWeight > this.$route.query.capacity){
+        this.$message({
+          message: '入库量大于该仓库容量!',
+          type: 'warning',
+        })
+        return
+      }
+      this.$confirm(`确定提交入库信息`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            if (valid) {
+              this.deptBudgetList.compId = sessionStorage.getItem(
+                'ws-pf_compId'
+              )
+              this.deptBudgetList.inOutFlag = 2
+              this.deptBudgetList.statusFlag = 3
+              addstorageputList(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('添加成功')
+                  this.$router.push({ path: 'warehouseManagementList' })
+                })
+            } else {
+              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    temporaryStorage() {
+       if (!this.deptBudgetList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if(!this.deptBudgetList.grossWeight){
+         this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.grossWeight < 0 ||
+        this.deptBudgetList.grossWeight > 10000 ||
+        (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.grossWeight).length -
+            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.tare){
+         this.$message({
+          message: '皮重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.tare < 0 ||
+        this.deptBudgetList.tare > 10000 ||
+        (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+          String(this.deptBudgetList.tare).length -
+            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.agent){
+         this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.agent.length < 2 ||
+        this.deptBudgetList.agent.length > 10
+      ) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.carNo){
+         this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.contractNo){
+         this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractNo.length < 6 ||
+        this.deptBudgetList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6-20个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+       if(this.deptBudgetList.netWeight > this.$route.query.capacity){
+        this.$message({
+          message: '入库量大于该仓库容量!',
+          type: 'warning',
+        })
+        return
+      }
+      this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            if (valid) {
+              this.deptBudgetList.compId = sessionStorage.getItem(
+                'ws-pf_compId'
+              )
+              this.deptBudgetList.inOutFlag = 2
+              this.deptBudgetList.statusFlag = 1
+              addstorageputList(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('暂存成功')
+                  this.$router.push({ path: 'warehouseManagementList' })
+                })
+            } else {
+              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    tarechange(e) {
+      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
+        this.deptBudgetList.netWeight = Number(
+          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+        )
+      }
+    },
+    grossWeightchange(e) {
+      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
+        this.deptBudgetList.netWeight = Number(
+          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+        )
+      }
+    },
+    selectgoodsName(e) {
+      for (var i = 0; i < this.goodnameList.length; i++) {
+        if (this.goodnameList[i].constValue == e) {
+          this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+        }
+      }
+    },
+    selectpackingMethod(e) {
+      for (var i = 0; i < this.packtypeList.length; i++) {
+        if (this.packtypeList[i].constValue == e) {
+          this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+        }
+      }
+    },
+    selectstorageType(e) {
+      for (var i = 0; i < this.storageType.length; i++) {
+        if (this.storageType[i].constValue == e) {
+          this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
+        }
+      }
+    },
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    getList() {
+      // 货名
+      pullDown({ constId: 'CON2' })
+        .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) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    fujian(row) {
+      if (
+        row.receiveAttachmentPath === null ||
+        row.receiveAttachmentPath === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.receiveAttachmentPath
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    // handleCloe() {
+    //   this.dialogViewSpareMoney = false
+    // },
+    // history(row) {
+    //   billoperatehis({ id: row.id })
+    //     .toPromise()
+    //     .then((response) => {
+    //       this.historyList = response
+    //     })
+    // },
+    // deletecontract(){},
+    //删除
+    approve() {},
+    listQuery() {},
+  },
+}
+</script>
+<style lang="scss" scoped>
+/deep/.basicInformation {
+  .ws-info-table {
+    border: none;
+  }
+  .el-form-item {
+    width: 33.3333%;
+    border: none;
+    .el-form-item__label {
+      background: transparent;
+      border: none;
+    }
+    .el-form-item__content {
+      border: none;
+    }
+  }
+}
+.title {
+  position: relative;
+  padding-left: 10px;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-form {
+  padding: 0 10%;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+.bg-right {
+  text-align: right;
+  padding: 16px 20px;
+}
+.center {
+  position: relative;
+  top: 50px;
+  width: 40%;
+  height: 2000px;
+  margin: 0 auto;
+}
+/deep/.el-form-item__label {
+  width: 160px;
+}
+//选填
+/deep/.el-form-item {
+  width: 50%;
+}
+.container {
+  overflow: scroll;
+  height: 120vh;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  text-align: center;
+}
+.deliverydate {
+  display: inline-block;
+  width: 10%;
+}
+.center {
+  margin-top: -60px;
+  width: 80%;
+}
+//仓位
+
+.position{
+background: #AFB5CB;
+border-radius: 2px;
+font-size: 12px;
+color: #FFFFFF;
+line-height: 20px;
+display: inline-grid;
+padding: 2px 4px;
+}
+// .position {
+//   width: 52px;
+//   height: 20px;
+//   background: #afb5cb;
+//   border-radius: 2px;
+//   font-size: 12px;
+//   font-family: PingFangSC-Medium, PingFang SC;
+//   color: #ffffff;
+//   line-height: 20px;
+// }
+//表格文字
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  text-align: left;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #8890b1;
+  line-height: 16px;
+}
+//质检员
+.inspector .el-form-item__content {
+  text-align: left;
+  margin-left: 0px;
+}
+.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;
+  padding: 4px 2px;
+}
+//下面列表
+.neifor {
+  width: 80%;
+  background-color: #f6f7fc;
+}
+/deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
+  width: 35%;
+  text-align: center;
+}
+/deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
+  width: 60%;
+  background-color: #f6f7fc;
+}
+
+/deep/.neifor .el-input--small .el-input__inner{
+  width: 100%;
+}
+.ws-info-table[data-v-850a44a6] .el-form-item {
+    width: 16.66%;
+}
+</style>

+ 909 - 0
src/views/tranManagement/tranManagementVehicleLook.vue

@@ -0,0 +1,909 @@
+// 查看派车详情
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">查看派车详情</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="revert()"
+          ><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" :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-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"
+          />
+          </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
+              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="inspector">
+        <!--自检员-->
+        <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
+          <ws-input
+            v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
+            placeholder="请输入质检员姓名"
+            maxlength="120"
+            size="small"
+          />
+        </ws-form-item>
+      </div>  -->
+
+      <div class="neifor">
+        <ws-info-table>
+          <!--司机-->
+          <ws-form-item label="司机" span="1" prop="waterContent">
+            <ws-select
+                v-model="deptBudgetList.waterContent"
+                placeholder="请选择司机"
+                @class="typeselect"
+                @change="selectwaterContent"
+            ></ws-select>
+          </ws-form-item>
+          <!--司机电话-->
+          <ws-form-item label="司机电话" span="1" prop="impurity">
+            <ws-select
+                v-model="deptBudgetList.impurity"
+                placeholder="请选择司机司机电话"
+            ></ws-select>
+          </ws-form-item>
+          <!--车牌号-->
+          <ws-form-item label="车牌号" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.bulkDensity"
+              placeholder=""
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--车型-->
+          <ws-form-item label="车型" span="1" prop="mildewGrain">
+            <ws-input
+              v-model="deptBudgetList.mildewGrain"
+              placeholder="请输入高栏"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--车长-->
+          <ws-form-item label="车长" span="1" prop="jiaorenli">
+            <ws-input
+              v-model="deptBudgetList.jiaorenli"
+              placeholder="请输入车长"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--载重吨-->
+          <ws-form-item label="载重(吨)" span="1" prop="imperfectGrain">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
+              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=""
+          />
+      </div>
+      
+      <el-button
+          class="add"
+          type="primary"
+          size="small"
+          @click="add1"
+          >添加司机</el-button
+        >
+      <div style="text-align: right; padding: 10px">
+        
+        <el-button
+          class="bg-bottom-up"
+          type="primary"
+          size="small"
+          @click="submit()"
+          >提交</el-button
+        >
+      </div>
+    </ws-form>
+  </div>
+</template>
+<script>
+import { pullDown, addstorageputList } from '@/model/warehouse/index'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+// import { dayjs, fmoney, EventBus } from 'base-core-lib'
+import { dayjs, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    // vesselId(val) {
+    //   this.getList()
+    // },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  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: {},
+      // 提交类型
+      submitType: true,
+      storageType: [],
+      readonly: true,
+      appendixIdsAdd: '',
+      uploadSuccess: {},
+      onChange: {},
+      gradeList: [],
+      rules: {
+        netWeight: [
+          {
+            required: true,
+            type: 'number',
+            message: '请输入活动名称',
+            trigger: 'blur',
+          },
+        ],
+      },
+      size: 10,
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      packtypeList: {},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      contractList: [],
+      deptBudgetList: {
+        warehouseInOutDetail: {},
+      },
+      historyList: [],
+
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      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,)
+  },
+  methods: {
+    //返回按钮
+    revert() {
+      this.$router.push({ path: 'tranManagementVehicle' })
+    },
+    del(index){
+        if(this.freightspace.length > 1 ){
+            this.freightspace.splice(index,1)
+        }
+    },
+    //提交按钮
+    submit() {
+      if (!this.deptBudgetList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if(!this.deptBudgetList.grossWeight){
+         this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.grossWeight < 0 ||
+        this.deptBudgetList.grossWeight > 10000 ||
+        (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.grossWeight).length -
+            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.tare){
+         this.$message({
+          message: '皮重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.tare < 0 ||
+        this.deptBudgetList.tare > 10000 ||
+        (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+          String(this.deptBudgetList.tare).length -
+            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.agent){
+         this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.agent.length < 2 ||
+        this.deptBudgetList.agent.length > 10
+      ) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.carNo){
+         this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.contractNo){
+         this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractNo.length < 6 ||
+        this.deptBudgetList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6-20个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+
+      
+      if(this.deptBudgetList.netWeight > this.$route.query.capacity){
+        this.$message({
+          message: '入库量大于该仓库容量!',
+          type: 'warning',
+        })
+        return
+      }
+      this.$confirm(`确定提交入库信息`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            if (valid) {
+              this.deptBudgetList.compId = sessionStorage.getItem(
+                'ws-pf_compId'
+              )
+              this.deptBudgetList.inOutFlag = 2
+              this.deptBudgetList.statusFlag = 3
+              addstorageputList(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('添加成功')
+                  this.$router.push({ path: 'warehouseManagementList' })
+                })
+            } else {
+              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    temporaryStorage() {
+       if (!this.deptBudgetList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if(!this.deptBudgetList.grossWeight){
+         this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.grossWeight < 0 ||
+        this.deptBudgetList.grossWeight > 10000 ||
+        (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.grossWeight).length -
+            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.tare){
+         this.$message({
+          message: '皮重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.tare < 0 ||
+        this.deptBudgetList.tare > 10000 ||
+        (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+          String(this.deptBudgetList.tare).length -
+            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.agent){
+         this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.agent.length < 2 ||
+        this.deptBudgetList.agent.length > 10
+      ) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.carNo){
+         this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.contractNo){
+         this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractNo.length < 6 ||
+        this.deptBudgetList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6-20个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+       if(this.deptBudgetList.netWeight > this.$route.query.capacity){
+        this.$message({
+          message: '入库量大于该仓库容量!',
+          type: 'warning',
+        })
+        return
+      }
+      this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            if (valid) {
+              this.deptBudgetList.compId = sessionStorage.getItem(
+                'ws-pf_compId'
+              )
+              this.deptBudgetList.inOutFlag = 2
+              this.deptBudgetList.statusFlag = 1
+              addstorageputList(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('暂存成功')
+                  this.$router.push({ path: 'warehouseManagementList' })
+                })
+            } else {
+              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    tarechange(e) {
+      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
+        this.deptBudgetList.netWeight = Number(
+          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+        )
+      }
+    },
+    grossWeightchange(e) {
+      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
+        this.deptBudgetList.netWeight = Number(
+          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+        )
+      }
+    },
+    selectgoodsName(e) {
+      for (var i = 0; i < this.goodnameList.length; i++) {
+        if (this.goodnameList[i].constValue == e) {
+          this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+        }
+      }
+    },
+    selectpackingMethod(e) {
+      for (var i = 0; i < this.packtypeList.length; i++) {
+        if (this.packtypeList[i].constValue == e) {
+          this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+        }
+      }
+    },
+    selectstorageType(e) {
+      for (var i = 0; i < this.storageType.length; i++) {
+        if (this.storageType[i].constValue == e) {
+          this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
+        }
+      }
+    },
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    getList() {
+      // 货名
+      pullDown({ constId: 'CON2' })
+        .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) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    fujian(row) {
+      if (
+        row.receiveAttachmentPath === null ||
+        row.receiveAttachmentPath === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.receiveAttachmentPath
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    // handleCloe() {
+    //   this.dialogViewSpareMoney = false
+    // },
+    // history(row) {
+    //   billoperatehis({ id: row.id })
+    //     .toPromise()
+    //     .then((response) => {
+    //       this.historyList = response
+    //     })
+    // },
+    // deletecontract(){},
+    //删除
+    approve() {},
+    listQuery() {},
+  },
+}
+</script>
+<style lang="scss" scoped>
+/deep/.basicInformation {
+  .ws-info-table {
+    border: none;
+  }
+  .el-form-item {
+    width: 33.3333%;
+    border: none;
+    .el-form-item__label {
+      background: transparent;
+      border: none;
+    }
+    .el-form-item__content {
+      border: none;
+    }
+  }
+}
+.title {
+  position: relative;
+  padding-left: 10px;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-form {
+  padding: 0 10%;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+.bg-right {
+  text-align: right;
+  padding: 16px 20px;
+}
+.center {
+  position: relative;
+  top: 50px;
+  width: 40%;
+  height: 2000px;
+  margin: 0 auto;
+}
+/deep/.el-form-item__label {
+  width: 160px;
+}
+//选填
+/deep/.el-form-item {
+  width: 50%;
+}
+.container {
+  overflow: scroll;
+  height: 120vh;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  text-align: center;
+}
+.deliverydate {
+  display: inline-block;
+  width: 10%;
+}
+.center {
+  margin-top: -60px;
+  width: 80%;
+}
+//仓位
+
+.position{
+background: #AFB5CB;
+border-radius: 2px;
+font-size: 12px;
+color: #FFFFFF;
+line-height: 20px;
+display: inline-grid;
+padding: 2px 4px;
+}
+// .position {
+//   width: 52px;
+//   height: 20px;
+//   background: #afb5cb;
+//   border-radius: 2px;
+//   font-size: 12px;
+//   font-family: PingFangSC-Medium, PingFang SC;
+//   color: #ffffff;
+//   line-height: 20px;
+// }
+//表格文字
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  text-align: left;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #8890b1;
+  line-height: 16px;
+}
+//质检员
+.inspector .el-form-item__content {
+  text-align: left;
+  margin-left: 0px;
+}
+.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;
+  padding: 4px 2px;
+}
+//下面列表
+.neifor {
+  width: 80%;
+  background-color: #f6f7fc;
+}
+/deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
+  width: 35%;
+  text-align: center;
+}
+/deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
+  width: 60%;
+  background-color: #f6f7fc;
+}
+
+/deep/.neifor .el-input--small .el-input__inner{
+  width: 100%;
+}
+.ws-info-table[data-v-850a44a6] .el-form-item {
+    width: 16.66%;
+}
+</style>

+ 2 - 6
src/views/warehouse/component/router/index.js

@@ -25,7 +25,7 @@ const warehouseManagementRouter = {
         keepAlive: true
         // module: 'procurement.sparepart.applDetail'
       },
-      hidden: true
+       hidden: true
     },
 
     {
@@ -212,11 +212,7 @@ const warehouseManagementRouter = {
         // module: 'procurement.sparepart.applDetail'
       },
       hidden: true
-    },
-
-
-
-    
+    },   
   ],
 };
 export default warehouseManagementRouter;

+ 31 - 16
src/views/warehouse/warehouseManagementAdd.vue

@@ -128,10 +128,10 @@
             />
           </ws-form-item>
           <!--备注(选项)-->
-          <ws-form-item label="备注(选)" span="1" prop="placeDelivery">
+          <ws-form-item label="备注(选)" span="1" prop="placeDelivery">
             <ws-input
               v-model="item.remark"
-              placeholder="请输入交货地"
+              placeholder="请输入备注"
               maxlength="20"
               size="small"
             />
@@ -188,7 +188,13 @@
 //  import { getVesselOne } from '@/model/procurement/basic'
 //  import { dayjs } from 'base-core-lib'
 import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
-import { addList, addxiala, editxiala, delxiala } from '@/model/warehouse/index'
+import {
+  addList,
+  addxiala,
+  editxiala,
+  delxiala,
+  xiala,
+} from '@/model/warehouse/index'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
 export default {
@@ -264,7 +270,9 @@ export default {
       list: [],
     }
   },
-  activated() {},
+  activated() {
+    this.loaddata()
+  },
   computed: {
     totalStorage: function () {
       var maxStorage = 0
@@ -307,6 +315,9 @@ export default {
       this.selectedOptions = value
     },
     returnsales() {
+      this.deptBudgetList = {}
+      this.freightspace = {}
+      this.selectedOptions = ""
       this.$router.push({ path: 'warehouseManagementList' })
     },
     // confirmPosition() {
@@ -326,26 +337,28 @@ export default {
     onChange(files) {
       this.fileNum = files
       this.$refs.upload.handleSaveBill().then((res) => {
-        console.log(files)
       })
     },
 
     submit() {
-       if(!this.deptBudgetList.warehouseName){
+      if (!this.deptBudgetList.warehouseName) {
         this.$message({
           message: '仓库名称不能为空!',
           type: 'warning',
         })
         return
       }
-      if(this.deptBudgetList.warehouseName.length < 2 || this.deptBudgetList.warehouseName.length > 20){
+      if (
+        this.deptBudgetList.warehouseName.length < 2 ||
+        this.deptBudgetList.warehouseName.length > 20
+      ) {
         this.$message({
           message: '仓库名长度不符合要求!',
           type: 'warning',
         })
         return
       }
-       if(!this.deptBudgetList.personCharge){
+      if (!this.deptBudgetList.personCharge) {
         this.$message({
           message: '负责人不能为空!',
           type: 'warning',
@@ -362,14 +375,14 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.personPhone){
+      if (!this.deptBudgetList.personPhone) {
         this.$message({
           message: '负责人电话不能为空!',
           type: 'warning',
         })
         return
       }
-      if(this.deptBudgetList.personPhone.length != 11){
+      if (this.deptBudgetList.personPhone.length != 11) {
         this.$message({
           message: '手机号输入有误!',
           type: 'warning',
@@ -383,15 +396,15 @@ export default {
       //   })
       //   return
       // }
-       if(!this.deptBudgetList.detailedAddress){
+      if (!this.deptBudgetList.detailedAddress) {
         this.$message({
           message: '详细地址不能为空!',
           type: 'warning',
         })
         return
       }
-      
-      if(this.totalStorage <= 0){
+
+      if (this.totalStorage <= 0) {
         this.$message({
           message: '仓位储量不能为空!',
           type: 'warning',
@@ -434,9 +447,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.warehousePrivate =
                 CodeToText[this.selectedOptions[0]]
               this.deptBudgetList.warehouseCity =
@@ -449,6 +461,9 @@ export default {
                 .toPromise()
                 .then((response) => {
                   this.$message.success('添加成功')
+                  this.deptBudgetList = {}
+                  this.freightspace = {}
+                  this.selectedOptions = ""
                   this.$router.push({ path: 'warehouseManagementList' })
                 })
             } else {

+ 15 - 4
src/views/warehouse/warehouseManagementDelete.vue

@@ -35,12 +35,16 @@
           </template>
         </el-table-column>
         <el-table-column prop="warehouseName" label="仓库名称">
+
         </el-table-column>
-        <el-table-column prop="warehouseLocation" label="仓库所在地">
+        <el-table-column prop="warehousePrivate" label="仓库所在地">
+          <template scope="scope">
+            {{scope.row.warehousePrivate}}{{scope.row.warehouseCity}}{{scope.row.warehouseArea}}
+          </template>
         </el-table-column>
-        <el-table-column prop="nowStorage" label="应余库存(吨)">
+        <el-table-column prop="residual" label="应余库存(吨)">
         </el-table-column>
-        <el-table-column prop="personCharge;" label="负责人"> </el-table-column>
+        <el-table-column prop="personCharge" label="负责人"> </el-table-column>
 
         <el-table-column prop="address" label="操作" width="200">
           <template slot-scope="scope">
@@ -67,7 +71,6 @@
 </template>
 <script>
 import {
-  getList,
   delectlist,
   deletewarehouse,
   hide,
@@ -166,6 +169,7 @@ export default {
     },
     //删除
     handleDelete(row) {
+      if(row.residual == 0){
     // console.log(row)
     this.$confirm(`此操作永久删除该仓库全部信息,是否确认删除`, {
       cancelButtonText: '取消',
@@ -190,6 +194,13 @@ export default {
       .catch(() => {
         return false
       })
+      }else{
+         this.$message({
+            message: '还有应余库存,不能删除此仓库!',
+            type: 'warning',
+          })
+          return
+      }
   },
     //隐藏
     handleHide(row) {

+ 386 - 4
src/views/warehouse/warehouseManagementDelivery.vue

@@ -365,7 +365,7 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.grossWeight < 0 ||
+        this.deptBudgetList.grossWeight <= 0 ||
         this.deptBudgetList.grossWeight > 10000 ||
         (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
           String(this.deptBudgetList.grossWeight).length -
@@ -446,6 +446,197 @@ export default {
           type: 'warning',
         })
         return
+      }
+       //自检员
+      if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+       //霉变
+      if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+       //热损伤
+      if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+        //不完整粒(%)
+      if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完整粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完整粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+       if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') +
+                1) >
+              0)
+        ) {
+          this.$message({
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
+            type: 'warning',
+          })
+          return
+        }
       }
       this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
         cancelButtonText: '取消',
@@ -493,7 +684,7 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.grossWeight < 0 ||
+        this.deptBudgetList.grossWeight <= 0 ||
         this.deptBudgetList.grossWeight > 10000 ||
         (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
           String(this.deptBudgetList.grossWeight).length -
@@ -535,7 +726,7 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.netWeight < 0 ||
+        this.deptBudgetList.netWeight <= 0 ||
         this.deptBudgetList.netWeight >= 10000
       ) {
         this.$message({
@@ -616,10 +807,197 @@ export default {
         })
         return
       }
-     
+       //自检员
+      if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
 
+      //杂质
+      if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+       //霉变
+      if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
 
+       //热损伤
+      if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
 
+        //不完整粒(%)
+      if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完整粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完整粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+       if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') +
+                1) >
+              0)
+        ) {
+          this.$message({
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
+            type: 'warning',
+          })
+          return
+        }
+      }
        this.$confirm(`确定提交出库信息`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
@@ -856,11 +1234,15 @@ export default {
   color: #8890b1;
   line-height: 16px;
 }
+.inspector{
+  width: 50%;
+} 
 //质检员
 .inspector .el-form-item__content {
   text-align: left;
   margin-left: 0px;
 }
+
 .small-title {
   position: relative;
   padding: 10px;

+ 7 - 8
src/views/warehouse/warehouseManagementEdit.vue

@@ -257,21 +257,20 @@ export default {
   },
 computed : {
    totalStorage :function() {
-     var sum = 0
+     var sum  = 0
      if(this.deptBudgetList.warehousePositionInfoList){
        for(var i = 0;i < this.deptBudgetList.warehousePositionInfoList.length; i++ ){
-
-      sum += this.deptBudgetList.warehousePositionInfoList[i].maxStorage
-     }
+      sum += Number(this.deptBudgetList.warehousePositionInfoList[i].maxStorage)
      }
-     
+     }    
      return sum
     },
 },
   methods: {
     //返回按钮
     returnWarehouse() {
-      this.$router.push({ path: 'warehouseManagementList' })
+      this.deptBudgetList = {}
+      this.$router.push({ path: 'warehouseManagementList' })   
     },
     marker: function (item) {
       this.deptBudgetList.warehousePositioning =
@@ -470,8 +469,8 @@ computed : {
           edit(this.deptBudgetList)
             .toPromise()
             .then((response) => {
-              this.$message.success('编辑成功')
-              this.deptBudgetList = {}
+              this.$message.success('编辑成功')     
+                            this.deptBudgetList = {}
               this.$router.push({ path: 'warehouseManagementList' })
             })
         } else {

+ 139 - 89
src/views/warehouse/warehouseManagementIoss.vue

@@ -23,8 +23,8 @@
     <div class="center">
       <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
         <h2>
-          {{ deptBudgetList1.warehouseName }}库
-          <span class="position"> {{ deptBudgetList1.binNumber }}仓位 </span>
+          {{ this.$route.query.warehouseName }}
+          <span class="position"> {{ this.$route.query.binNumber }}仓位 </span>
         </h2>
         <!-- 货名 -->
         <ws-form-item
@@ -130,17 +130,13 @@
   </div>
 </template>
 <script>
-import {
-  goodsname,
-  ioss,
-  submitioss,
-} from '@/model/warehouse/index'
+import { goodsname, ioss, submitioss } from '@/model/warehouse/index'
 
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
-import { mapActions, mapGetters, mapState } from 'vuex'
+import { mapActions, mapGetters, mapState } from 'vuex'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
-import { dayjs} from 'base-core-lib'
+import { dayjs } from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   components: {
@@ -149,7 +145,7 @@ export default {
   },
   watch: {
     vesselId(val) {
-      this.getList()
+      this.loaddata()
     },
     isShow(val) {
       this.showType = val
@@ -179,22 +175,23 @@ export default {
       // 提交类型
       submitType: true,
       selectpackingMethod: {},
-      goodnameList:[],
+      goodnameList: [],
       size: 10,
+      
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       packtypeList: {},
-      deptBudgetList1:[],
+      deptBudgetList1: [],
       date: {
         year: dayjs().format('YYYY'),
         month: dayjs().format('MM'),
       },
       contractList: [],
-      deptBudgetList:{
-        physicalInventory:0
+      deptBudgetList: {
+        physicalInventory: 0,
       },
       historyList: [],
-       rules: {
+      rules: {
         netWeight: [
           {
             required: true,
@@ -212,89 +209,142 @@ export default {
       accessoryTFs: false,
     }
   },
-   computed:{
+  computed: {
     ...mapGetters([
       'userInfo',
-      'isFullScren',
-      'tagWel',
-      'tagList',
-      'isCollapse',
-      'tag',
-      'logsLen',
-      'logsFlag',
-      'language',
-    ]),
-    ioss1 :function() {
-     return (this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut)-this.deptBudgetList.physicalInventory
+      'isFullScren',
+      'tagWel',
+      'tagList',
+      'isCollapse',
+      'tag',
+      'logsLen',
+      'logsFlag',
+      'language',
+    ]),
+    ioss1: function () {
+      return (
+        this.deptBudgetList.cumulativeStockIn -
+        this.deptBudgetList.cumulativeStockOut -
+        this.deptBudgetList.physicalInventory
+      )
     },
-    surplusInventory1: function(){
-      return this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut
+    surplusInventory1: function () {
+      return (
+        this.deptBudgetList.cumulativeStockIn -
+        this.deptBudgetList.cumulativeStockOut
+      )
     },
-    inventoryRatio1 : function(){
-      var loss=(this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut)-this.deptBudgetList.physicalInventory
-      var defect=this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.physicalInventory
-      if((loss/defect)==1){
-        var num=0
-      }else{
+    inventoryRatio1: function () {
+      var loss =
+        this.deptBudgetList.cumulativeStockIn -
+        this.deptBudgetList.cumulativeStockOut -
+        this.deptBudgetList.physicalInventory
+      var defect =
+        this.deptBudgetList.cumulativeStockIn -
+        this.deptBudgetList.physicalInventory
+      if (loss / defect == 1) {
+        var num = 0
+      } else {
         // .占比=损耗量÷(累计入库-实际库存)
-        num = Math.floor((loss/defect)*1000000)/1000
+        num = Math.floor((loss / defect) * 1000000) / 1000
       }
-     
-     return num;
+      // this.deptBudgetList.inventoryRatio = this.deptBudgetList.inventoryRatio.toFixed(3)
+      //  this.deptBudgetList.inventoryRatio = num
+      return num
     },
-      
-
-   },
+  },
   activated() {
     //cg.viewBudget
     //cg.viewSpareMoney
     // this.getVesselData();
-    this.loaddata()
-    this.showType = this.isShow
-  },
-   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.deptBudgetList1.warehouseName = this.$route.query.warehouseName
-    this.deptBudgetList1.binNumber = this.$route.query.binNumber
-   this.deptBudgetList1.baseId=this.$route.query.baseId
-    this.deptBudgetList1.positionId=this.$route.query.positionId
-    // this.deptBudgetList.inventoryRatio=((deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory)/(deptBudgetList.cumulativeStockIn-deptBudgetList.physicalInventory)*100
-    // this.deptBudgetList.ioss=(deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory
-    // this.deptBudgetList1.goodsNameKey=this.deptBudgetList.goodsNameKey
-    // this.getList()
+    this.deptBudgetList1.binNumber = this.deptBudgetList.binNumber
+    this.deptBudgetList1.baseId = this.$route.query.baseId
+    this.deptBudgetList1.positionId = this.deptBudgetList.positionId
+    this.loaddata()
+    this.showType = this.isShow
+    console.log(this.deptBudgetList)
   },
   methods: {
     //返回按钮
     returnWarehouse() {
+      this.deptBudgetList = {}
       this.$router.push({ path: 'warehouseManagementList' })
     },
     //提交按钮
-    submit(){
-       this.$refs.deptBudgetList.validate((valid) => {
-        if (valid) {
-          this.deptBudgetList.surplusInventory=this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut
-          this.deptBudgetList.loss=(this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut)-this.deptBudgetList.physicalInventory
-         this.deptBudgetList.inventoryRatio=((this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut)-this.deptBudgetList.physicalInventory)/(this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.physicalInventory)
-         this.deptBudgetList.baseId=this.deptBudgetList1.baseId
-          this.deptBudgetList.positionId=this.deptBudgetList1.positionId
-          this.deptBudgetList.binNumber=this.deptBudgetList1.binNumber
-          this.deptBudgetList.warehouseName=this.deptBudgetList1.warehouseName
-          this.deptBudgetList.qualityInspector= this.userInfo.showRoleName
-       for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].goodsName == this.deptBudgetList.goodsName) {
-          this.deptBudgetList.goodsNameKey = this.goodnameList[i].goodsNameKey
-        }
+    submit() {
+      if (!this.deptBudgetList.goodsName) {
+        this.$message({
+          message: '货名不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.physicalInventory) {
+        this.$message({
+          message: '实际库存不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.physicalInventory <= 0) {
+        this.$message({
+          message: '实际库存输入错误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.cumulativeStockIn -
+          this.deptBudgetList.physicalInventory <=
+        0
+      ) {
+        return
       }
-         this.deptBudgetList.compId = this.compId
+
+      this.$refs.deptBudgetList.validate((valid) => {
+        if (valid) {
+          this.deptBudgetList.surplusInventory =
+            this.deptBudgetList.cumulativeStockIn -
+            this.deptBudgetList.cumulativeStockOut
+          this.deptBudgetList.loss =
+            this.deptBudgetList.cumulativeStockIn -
+            this.deptBudgetList.cumulativeStockOut -
+            this.deptBudgetList.physicalInventory
+          this.deptBudgetList.inventoryRatio =
+            Math.floor(
+              ((this.deptBudgetList.cumulativeStockIn -
+                this.deptBudgetList.cumulativeStockOut -
+                this.deptBudgetList.physicalInventory) /
+                (this.deptBudgetList.cumulativeStockIn -
+                  this.deptBudgetList.physicalInventory)) *
+                1000000
+            ) / 1000
+          //  this.deptBudgetList.inventoryRatio = inventoryRatio1
+          this.deptBudgetList.baseId = this.deptBudgetList1.baseId
+          this.deptBudgetList.positionId = this.deptBudgetList1.positionId
+          this.deptBudgetList.binNumber = this.deptBudgetList1.binNumber
+          this.deptBudgetList.warehouseName = this.deptBudgetList1.warehouseName
+          this.deptBudgetList.qualityInspector = this.userInfo.showRoleName
+          for (var i = 0; i < this.goodnameList.length; i++) {
+            if (
+              this.goodnameList[i].goodsName == this.deptBudgetList.goodsName
+            ) {
+              this.deptBudgetList.goodsNameKey =
+                this.goodnameList[i].goodsNameKey
+            }
+          }
+          this.deptBudgetList.compId = this.compId
           this.deptBudgetList.contractType = 1
-          console.log(this.deptBudgetList)
-         submitioss(this.deptBudgetList)
+          submitioss(this.deptBudgetList)
             .toPromise()
             .then((response) => {
               this.$message.success('提交成功')
+              this.deptBudgetList = {}
               this.$router.push({ path: 'warehouseManagementList' })
             })
         } else {
@@ -338,26 +388,34 @@ export default {
       console.log(`当前页: ${val}`)
       this.getList()
     },
-    changeioss(e){
-        for (var i = 0; i < this.goodnameList.length; i++) {
+    changeioss(e) {
+      if (!this.deptBudgetList.baseId) {
+        this.deptBudgetList.baseId = this.$route.query.baseId
+        this.deptBudgetList.positionId = this.deptBudgetList1.positionId
+        this.deptBudgetList.binNumber = this.deptBudgetList1.binNumber
+      }
+      for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].goodsName == e) {
           this.deptBudgetList.goodsNameKey = this.goodnameList[i].goodsNameKey
         }
-      }  
+      }
       this.ioss()
     },
-     ioss(){
-      ioss(
-        this.deptBudgetList
-      )
+    ioss() {
+      ioss({
+        baseId: this.$route.query.baseId,
+        positionId: this.$route.query.positionId,
+        goodsNameKey: this.deptBudgetList.goodsNameKey,
+        goodsName: this.deptBudgetList.goodsName,
+      })
         .toPromise()
         .then((response) => {
-         this.deptBudgetList=response     
+          this.deptBudgetList = response
         })
     },
-     loaddata() {
+    loaddata() {
       // 货名
-      goodsname({positionId : this.$route.query.positionId})
+      goodsname({ positionId: this.$route.query.positionId })
         .toPromise()
         .then((response) => {
           this.goodnameList = response
@@ -369,15 +427,7 @@ export default {
           this.searchType = this.taskTypeList[i].type
         }
       }
-    },  
-   
-    // deletecontract(){},
-    //删除
-    approve() {},
-    listQuery() {},
-    total() {},
-    clearfiltQuery() {},
-    selectCrtDuty() {},
+    },
   },
 }
 </script>

+ 15 - 11
src/views/warehouse/warehouseManagementList.vue

@@ -182,7 +182,7 @@ import {
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
-import { dayjs, fmoney, EventBus } from 'base-core-lib'
+import { EventBus } from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   components: {
@@ -227,6 +227,7 @@ export default {
       warehouseList: [],
       deptBudgetList: {},
       historyList: [],
+      deptBudgetTotal: 0,
       pickerBeginDateBefore: {
         disabledDate: (time) => {
           return time.getTime() > Date.now()
@@ -260,7 +261,7 @@ export default {
     warehousing(item) {
       var free = 0
       for (var i = 0; i < item.warehouseNumViewList.length; i++) {
-        free += item.warehouseNumViewList[i].storage
+        free += Number(item.warehouseNumViewList[i].storage)
       }
       this.$router.push({
         path: 'warehouseManagementPut',
@@ -270,6 +271,7 @@ export default {
           warehouseName: item.warehouseName,
           binNumber: item.binNumber,
           capacity: item.capacity - free,
+          id: item.id,
         },
       })
     },
@@ -306,15 +308,17 @@ export default {
     },
     //待完成//传参
     nocomplete(row) {
-      this.$router.push({
-        path: 'warehouseManagementNoComplete',
-        query: {
-          baseId: row.warehouseId,
-          positionId: row.binNumberId,
-          warehouseName: row.warehouseName,
-          binNumber: row.binNumber,
-        },
-      })
+      if (row.number > 0) {
+        this.$router.push({
+          path: 'warehouseManagementNoComplete',
+          query: {
+            baseId: row.warehouseId,
+            positionId: row.binNumberId,
+            warehouseName: row.warehouseName,
+            binNumber: row.binNumber,
+          },
+        })
+      }
     },
     //记录
     record(item) {

+ 16 - 26
src/views/warehouse/warehouseManagementLook.vue

@@ -74,7 +74,7 @@
           </ws-form-item>
           <!--总储量(吨)-->
           <ws-form-item label="总储量(吨)" span="1" prop="totalStorage">
-            {{ deptBudgetList.totalStorage }}
+            {{ totalStorage }}
           </ws-form-item>
         </ws-info-table>
 
@@ -87,12 +87,6 @@
               prop="binNumber"
               class="forlist"
             >
-              <!-- <ws-input
-              v-model.number="item.binNumber"
-              placeholder="请输入仓位编号"
-              maxlength="100"
-              size="small"
-            /> -->
               {{ item.binNumber }}
             </ws-form-item>
             <!--最大储量(吨)-->
@@ -102,32 +96,15 @@
               prop="maxStorage"
               class="forlist"
             >
-              <!-- <ws-input
-              v-model="item.maxStorage"
-              placeholder="请输入最大储量(吨)"
-              maxlength="20"
-              size="small"
-            /> -->
               {{ item.maxStorage }}
             </ws-form-item>
             <!--现有储量-->
             <ws-form-item label="现有储量" span="1" prop="nowStorage">
-              <!-- <ws-input
-              v-model="item.nowStorage"
-              placeholder="请输入现有储量"
-              maxlength="100"
-              size="small"
-            /> -->
+    
               {{ item.nowStorage }}
             </ws-form-item>
             <!--备注(选填)-->
             <ws-form-item label="备注(选填)" span="1" prop="remark">
-              <!-- <ws-input
-              v-model="item.remark"
-              placeholder="请输入备注(选项)"
-              maxlength="100"
-              size="small"
-            /> -->
               {{ item.remark }}
             </ws-form-item>
           </ws-info-table>
@@ -211,13 +188,26 @@ export default {
     }
   },
   activated() {
-    this.loaddata()
+    this.selectpackingMethod()
     this.showType = this.isShow
+    this.loaddata()
   },
+  computed : {
+   totalStorage :function() {
+     var sum  = 0
+     if(this.deptBudgetList.warehousePositionInfoList){
+       for(var i = 0;i < this.deptBudgetList.warehousePositionInfoList.length; i++ ){
+      sum += Number(this.deptBudgetList.warehousePositionInfoList[i].maxStorage)
+     }
+     }    
+     return sum
+    },
+},
   methods: {
     //返回按钮
     returnWarehouse() {
       this.$router.push({ path: 'warehouseManagementList' })
+      this.deptBudgetList = {}
     },
     dateFormat(fmt, date) {
       let ret

+ 49 - 27
src/views/warehouse/warehouseManagementNoComplete.vue

@@ -42,10 +42,10 @@
           </el-table-column>
           <el-table-column prop="goodsName" label="货名"> </el-table-column>
           <el-table-column
-            prop="grossWeight;"
+            prop="grossWeight"
             label="毛重(吨)"
           ></el-table-column>
-          <el-table-column prop=" tare" label="皮重(吨)"> </el-table-column>
+          <el-table-column prop="tare" label="皮重(吨)"> </el-table-column>
           <el-table-column
             prop="netWeight"
             label="净重(吨)"
@@ -120,14 +120,12 @@
 <script>
 import {
   complete,
-  export1,
-  billoperatehis,
   delInOut,
   // deletewarehouse,
   // warehouseName,
   // addstorageputList,
 } from '@/model/warehouse/index'
-import { downloadFile } from '@/utils/batchDown'
+// import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
 import { dayjs } from 'base-core-lib'
@@ -170,7 +168,6 @@ export default {
       improved: [],
       row: [],
       deptBudgetList1: [],
-
       // 提交类型
       submitType: true,
       selectpackingMethod: {},
@@ -185,7 +182,6 @@ export default {
       contractList: [],
       deptBudgetList: {},
       historyList: [],
-
       // inOutDate:null,
       pickerBeginDateBefore: {
         disabledDate: (time) => {
@@ -201,7 +197,6 @@ export default {
     // this.getVesselData();
     this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
     this.binNumber = this.$route.params.binNumber
-
     //接参
     this.getList(this.$route.query.baseId, this.$route.query.positionId)
     this.showType = this.isShow
@@ -214,33 +209,61 @@ export default {
     //编辑
     edits(row) {
       if (row.inOutFlag == 2) {
+        this.$store.dispatch('app/setdeptBudgetList', row)
         this.$router.push({
           path: 'warehouseManagementPerfectput',
           query: {
-            warehouseName: row.warehouseName,
-            binNumber: row.binNumber,
-            baseId: row.warehouseId,
-            positionId: row.binNumberId,
+             id:row.id,
+             agent:row.agent,
+             baseId: row.baseId,
+             binNumber: row.binNumber,
+             carNo:row.carNo,
+             compId:row.compId,
+             contractNo:row.contractNo,
+             goodsName:row.goodsName,
+             goodsNameKey:row.goodsNameKey,
+             grade:row.grade,
+             grossWeight:row.grossWeight,
+             inOutDate:row.inOutDate,
+             inOutFlag:row.inOutFlag,
+             inOutType:row.inOutType,
+             inOutTypeKey:row.inOutTypeKey,
+             netWeight:row.netWeight,
+             positionId: row.positionId,
+             statusFlag:row.statusFlag,
+             tare:row.tare,
+             warehouseName: row.warehouseName,  
+             warehouseInOutDetail:row.warehouseInOutDetail
           },
         })
       } else if(row.inOutFlag==1){
+        this.$store.dispatch('app/setdeptBudgetList', row)
+      // this.$store.commit('deptBudgetList',row)
         this.$router.push({
           path: 'warehouseManagementPerfectDelivery',
           query: {
-            warehouseName: row.warehouseName,
-            binNumber: row.binNumber,
-            baseId: row.warehouseId,
-            positionId: row.binNumberId,
-            goodsName:row.goodsName,
-            grossWeight:row.grossWeight,
-            tare:row.tare,
-            netWeight:row.netWeight,
-            grade:row.grade,
-            agent:row.agent,
-            carNo:row.carNo,
-            inOutDate:row.inOutDate,
-            contractNo:row.contractNo,
-            inOutType:row.inOutType,
+             id:row.id,
+             agent:row.agent,
+             baseId: row.baseId,
+             binNumber: row.binNumber,
+             carNo:row.carNo,
+             compId:row.compId,
+             contractNo:row.contractNo,
+             goodsName:row.goodsName,
+             goodsNameKey:row.goodsNameKey,
+             grade:row.grade,
+             grossWeight:row.grossWeight,
+             inOutDate:row.inOutDate,
+             inOutFlag:row.inOutFlag,
+             inOutType:row.inOutType,
+             inOutTypeKey:row.inOutTypeKey,
+             netWeight:row.netWeight,
+             positionId: row.positionId,
+             statusFlag:row.statusFlag,
+             tare:row.tare,
+             warehouseName: row.warehouseName,  
+             warehouseInOutDetail:row.warehouseInOutDetail
+
           }
           })
       }
@@ -320,7 +343,6 @@ export default {
               this.getList(row.baseId,row.positionId)
             })
             .catch((response) => {
-
             })
         })
         .catch(() => {

+ 388 - 110
src/views/warehouse/warehouseManagementPerfectDelivery.vue

@@ -23,7 +23,7 @@
       </el-col>
     </el-row>
 
-    <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
+    <ws-form ref="dataList" :model="dataList" :rules="rules">
       <div class="basicInformation">
         <h2>
           {{ this.deptBudgetList1.warehouseName }}库
@@ -36,7 +36,7 @@
           <!-- 货名 -->
           <ws-form-item label="货名" span="1">
             <ws-select
-              v-model="deptBudgetList.goodsName"
+              v-model="dataList.goodsName"
               placeholder=""
               class="typeselect"
               @change="selectgoodsName"
@@ -53,7 +53,7 @@
           <ws-form-item label="毛重(吨)" span="1" prop="grossWeight">
             <ws-input
               @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
+              v-model="dataList.grossWeight"
               placeholder="请输入毛重"
               maxlength="20"
               size="small"
@@ -69,7 +69,7 @@
           >
             <ws-input
               @input="tarechange"
-              v-model="deptBudgetList.tare"
+              v-model="dataList.tare"
               placeholder="请输入皮重"
               maxlength="100"
               size="small"
@@ -79,7 +79,8 @@
           <!--净重(吨)-->
           <ws-form-item label="净重(吨)" span="1" prop="netWeight">
             <ws-input
-              v-model.number="deptBudgetList.netWeight"
+            :readonly="readonly"
+              v-model.number="dataList.netWeight"
               placeholder="不可编辑,自动计算"
               type="number"
               maxlength="120"
@@ -89,7 +90,7 @@
           <!-- 品级 -->
           <ws-form-item label="品级" span="1" class="readonly">
             <ws-select
-              v-model="deptBudgetList.grade"
+              v-model="dataList.grade"
               placeholder=""
               class="typeselect"
               @change="selectpackingMethod"
@@ -106,7 +107,7 @@
           <!--经办人-->
           <ws-form-item label="经办人" span="1" prop="agent">
             <ws-input
-              v-model="deptBudgetList.agent"
+              v-model="dataList.agent"
               placeholder="请输入出库经办人姓名"
               maxlength="100"
               size="small"
@@ -120,16 +121,16 @@
             class="deliverydate"
           >
             <ws-date-picker
-              v-model="deptBudgetList.inOutDate"
+              v-model="dataList.inOutDate"
               type="date"
               placeholder="请选择出库日期"
               value-format="yyyy-MM-dd"
             />
           </ws-form-item>
-          <!-- 库类型 -->
+          <!-- 库类型 -->
           <ws-form-item label="出库类型" span="1">
             <ws-select
-              v-model="deptBudgetList.inOutType"
+              v-model="dataList.inOutType"
               placeholder=""
               class="typeselect"
               @change="selectstorageType"
@@ -146,7 +147,7 @@
           <!--车牌号-->
           <ws-form-item label="车牌号" span="1" prop="sourceGoods">
             <ws-input
-              v-model="deptBudgetList.carNo"
+              v-model="dataList.carNo"
               placeholder="请输入车牌号"
               maxlength="20"
               size="small"
@@ -156,7 +157,7 @@
           <!--合同编号-->
           <ws-form-item label="合同编号" span="1" prop="contractNo">
             <ws-input
-              v-model="deptBudgetList.contractNo"
+              v-model="dataList.contractNo"
               placeholder="请输入合同编号"
               maxlength="100"
               size="small"
@@ -171,7 +172,7 @@
         oss-key="mainPlan"
         :comp-id="compId"
         :appendix-ids="appendixIdsAdd"
-        :vesselId="deptBudgetList.addressUrl"
+        :vesselId="dataList.addressUrl"
         :size-limit="size"
         @uploadSuccess="uploadSuccess"
         @onChange="onChange"
@@ -179,10 +180,10 @@
       />
       <div class="small-title">化验数据(选填)</div>
       <div class="inspector">
-        <!--检员-->
+        <!--检员-->
         <ws-form-item label="质检员" span="1" prop="qualityInspector">
           <ws-input
-            v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
+            v-model="dataList.warehouseInOutDetail.qualityInspector"
             placeholder="请输入质检员姓名"
             maxlength="120"
             size="small"
@@ -194,7 +195,7 @@
           <!--水分(%)<=-->
           <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.waterContent"
+              v-model="dataList.warehouseInOutDetail.waterContent"
               placeholder="请输入水分占比"
               maxlength="120"
               size="small"
@@ -203,7 +204,7 @@
           <!--杂质(%)<=-->
           <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.impurity"
+              v-model="dataList.warehouseInOutDetail.impurity"
               placeholder="请输入杂质占比"
               maxlength="120"
               size="small"
@@ -212,7 +213,7 @@
           <!--容重(克/升)>=-->
           <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
+              v-model="dataList.warehouseInOutDetail.bulkDensity"
               placeholder="请输入容重"
               maxlength="120"
               size="small"
@@ -221,7 +222,7 @@
           <!--霉变粒(%)<=-->
           <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
+              v-model="dataList.warehouseInOutDetail.mildewGrain"
               placeholder="请输入霉变粒占比"
               maxlength="120"
               size="small"
@@ -230,7 +231,7 @@
           <!--热损伤(%)<=-->
           <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
+              v-model="dataList.warehouseInOutDetail.jiaorenli"
               placeholder="请输入热损伤占比"
               maxlength="120"
               size="small"
@@ -239,7 +240,7 @@
           <!--不完整粒(%)<=-->
           <ws-form-item label="不完整粒(%)<=" span="1" prop="imperfectGrain">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
+              v-model="dataList.warehouseInOutDetail.imperfectGrain"
               placeholder="请输入不完整粒占比"
               maxlength="120"
               size="small"
@@ -271,6 +272,7 @@ import { pullDown, addstorageputList } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
+import { mapActions, mapGetters, mapState } from 'vuex'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
 import { dayjs, EventBus } from 'base-core-lib'
 export default {
@@ -280,13 +282,15 @@ export default {
     Pagination,
   },
   watch: {
-    // vesselId(val) {
-    //   this.getList()
-    // },
     isShow(val) {
       this.showType = val
     },
   },
+  computed:{
+    ...mapGetters([
+      'deptBudgetList',
+    ]),
+  },
   data() {
     return {
       //弹出框
@@ -300,6 +304,7 @@ export default {
       showType: true,
       // 年
       year: '',
+      readonly:true,
       deptBudgetTotal: 0,
       currentPage: 1,
       pageSize: 10,
@@ -336,7 +341,18 @@ export default {
         month: dayjs().format('MM'),
       },
       contractList: [],
-      deptBudgetList: {
+      dataList: {
+        id:'',
+        grossWeight:'',
+        contractNo:'',
+        tare:'',
+        netWeight:'',
+        grade:'',
+        agent:'',
+        carNo:'',
+        inOutDate:'',
+        inOutType:'',
+        goodsName:'',
         warehouseInOutDetail: {},
       },
       historyList: [],
@@ -349,27 +365,38 @@ export default {
       accessoryTFs: false,
     }
   },
-  mounted() {
-    this.deptBudgetList.baseId = this.$route.query.baseId
-    this.deptBudgetList.positionId = this.$route.query.positionId
+  activated() {
     this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
     this.deptBudgetList1.binNumber = this.$route.query.binNumber
     this.getList()
-    this.deptBudgetList.goodsName= this.$route.query.goodsName
-    this.deptBudgetList.grossWeight = this.$route.query.grossWeight
-    this.deptBudgetList.tare = this.$route.query.tare
-    this.deptBudgetList.netWeight = this.$route.query.netWeight
-    this.deptBudgetList.grade = this.$route.query.grade
-    this.deptBudgetList.agent = this.$route.query.agent
-    this.deptBudgetList.carNo = this.$route.query.carNo
-    this.deptBudgetList.inOutDate = this.$route.query.inOutDate
-    this.deptBudgetList.contractNo = this.$route.query.contractNo
-    this.deptBudgetList.inOutType = this.$route.query.inOutType
+    this.dataList.id=this.$route.query.id
+    this.dataList.grossWeight=this.$route.query.grossWeight
+    this.dataList.contractNo = this.$route.query.contractNo
+    this.dataList.baseId = this.$route.query.baseId
+    this.dataList.positionId = this.$route.query.positionId
+    this.dataList.warehouseName = this.$route.query.warehouseName
+    this.dataList.binNumber = this.$route.query.binNumber
+    this.dataList.tare = this.$route.query.tare
+    this.dataList.netWeight = this.$route.query.netWeight
+    this.dataList.grade = this.$route.query.grade
+    this.dataList.agent = this.$route.query.agent
+    this.dataList.carNo = this.$route.query.carNo
+    this.dataList.inOutDate = this.$route.query.inOutDate
+    this.dataList.contractNo = this.$route.query.contractNo
+    this.dataList.inOutType = this.$route.query.inOutType
+    this.dataList.compId = this.$route.query.compId
+    this.dataList.goodsName = this.$route.query.goodsName
+    this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
+    this.dataList.inOutFlag = this.$route.inOutFlag
+    this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
+    this.dataList.statusFlag = this.$route.statusFlag
+    this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
+    console.log(this.dataList)
   },
   methods: {
     //返回按钮
     revert() {
-      this.$router.push({ path: 'warehouseManagementNoComplete' })
+      this.$router.go(-1)
     },
     //暂存按钮
     temporaryStorage() {
@@ -379,14 +406,14 @@ export default {
         type: 'warning',
       })
         .then(() => {
-          this.$refs.deptBudgetList.validate((valid) => {
+          this.$refs.dataList.validate((valid) => {
             if (valid) {
-              this.deptBudgetList.compId = sessionStorage.getItem(
+              this.dataList.compId = sessionStorage.getItem(
                 'ws-pf_compId'
               )
-              this.deptBudgetList.inOutFlag = 1
-              this.deptBudgetList.statusFlag = 1
-              addstorageputList(this.deptBudgetList)
+              this.dataList.inOutFlag = 1
+              this.dataList.statusFlag = 1
+              addstorageputList(this.dataList)
                 .toPromise()
                 .then((response) => {
                   this.$message.success('暂存成功')
@@ -404,94 +431,365 @@ export default {
     },
     //提交按钮
     submit() {
+        if (!this.dataList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.grossWeight) {
+        this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.grossWeight <= 0 ||
+        this.dataList.grossWeight > 10000 ||
+        (String(this.dataList.grossWeight).indexOf('.') != -1 &&
+          String(this.dataList.grossWeight).length -
+            (String(this.dataList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.tare < 0 ||
+        this.dataList.tare > 10000 ||
+        (String(this.dataList.tare).indexOf('.') != -1 &&
+          String(this.dataList.tare).length -
+            (String(this.dataList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.agent) {
+        this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
+      }
       if (
-        this.deptBudgetList.warehouseInOutDetail.qualityInspector.length < 2 ||
-        deptBudgetList.warehouseInOutDetail.qualityInspector > 10
+        this.dataList.agent.length < 2 ||
+        this.dataList.agent.length > 10
       ) {
         this.$message({
-          message: '质检员姓名长度错误!',
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+       if (!this.dataList.grade) {
+        this.$message({
+          message: '品级不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutDate) {
+        this.$message({
+          message: '入库日期不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutType) {
+        this.$message({
+          message: '入库类型不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.carNo) {
+        this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.contractNo) {
+        this.$message({
+          message: '合同编号不能为空',
           type: 'warning',
         })
         return
       }
       if (
-        this.deptBudgetList.warehouseInOutDetail.qualityInspector.length < 2 ||
-        deptBudgetList.warehouseInOutDetail.qualityInspector > 10
+        this.dataList.contractNo.length < 6 ||
+        this.dataList.contractNo.length > 20
       ) {
         this.$message({
-          message: '质检员姓名长度错误!',
+          message: '合同编号长度不符合要求,请输入6-20个字符之内',
           type: 'warning',
         })
         return
       }
 
-      this.$refs.deptBudgetList.validate((valid) => {
-        if (valid) {
-          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
-          this.deptBudgetList.inOutFlag = 1
-          this.deptBudgetList.statusFlag = 3
-          addstorageputList(this.deptBudgetList)
-            .toPromise()
-            .then((response) => {
-              this.$message.success('添加成功')
-              this.$router.push({ path: 'warehouseManagementList' })
-            })
-        } else {
-          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-          return false
+      if (this.dataList.netWeight > this.$route.query.capacity) {
+        this.$message({
+          message: '入库量大于该仓库容量!',
+          type: 'warning',
+        })
+        return
+      }
+       //自检员
+      if (this.dataList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.dataList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.dataList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
         }
-      })
-    },
-    //暂存按钮
-    returnWarehouse() {
-      this.$refs.deptBudgetList.validate((valid) => {
+      }
+      if (this.dataList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.waterContent < 1 ||
+          this.dataList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.dataList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.dataList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.dataList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.dataList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.impurity < 1 ||
+          this.dataList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.dataList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+       //霉变
+      if (this.dataList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.mildewGrain).length -
+              (String(
+                this.dataList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+       //热损伤
+      if (this.dataList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.dataList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+        //不完整粒(%)
+      if (this.dataList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完整粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.dataList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完整粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+       if (this.dataList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.bulkDensity < 1 ||
+          this.dataList.warehouseInOutDetail.bulkDensity > 40 ||
+          (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.bulkDensity).length -
+              (String(
+                this.dataList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') +
+                1) >
+              0)
+        ) {
+          this.$message({
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      this.$refs.dataList.validate((valid) => {
         if (valid) {
-          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
-          this.deptBudgetList.statusFlag = 1
-          addstorageputList(this.deptBudgetList)
+          this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
+          this.dataList.inOutFlag = 1
+          this.dataList.statusFlag = 3
+          addstorageputList(this.dataList)
             .toPromise()
             .then((response) => {
               this.$message.success('添加成功')
               this.$router.push({ path: 'warehouseManagementList' })
             })
         } else {
-          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+         EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
           return false
         }
       })
     },
     tarechange(e) {
-      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+      if (this.dataList.grossWeight && this.dataList.tare) {
+        this.dataList.netWeight = Number(
+          this.dataList.grossWeight - this.dataList.tare
         )
       }
     },
     grossWeightchange(e) {
-      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+      if (this.dataList.grossWeight && this.dataList.tare) {
+        this.dataList.netWeight = Number(
+          this.dataList.grossWeight - this.dataList.tare
         )
       }
     },
     selectgoodsName(e) {
       for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].constValue == e) {
-          this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+          this.dataList.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
+          this.dataList.packingMethodKey = this.packtypeList[i].constKey
         }
       }
     },
     selectstorageType(e) {
       for (var i = 0; i < this.storageType.length; i++) {
         if (this.storageType[i].constValue == e) {
-          this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
+          this.dataList.inOutTypeKey = this.storageType[i].constKey
         }
       }
     },
@@ -522,7 +820,7 @@ export default {
           this.gradeList = response
         })
       // 类型
-      pullDown({ constId: 'CON5' })
+      pullDown({ constId: 'CON6' })
         .toPromise()
         .then((response) => {
           this.storageType = response
@@ -568,31 +866,6 @@ export default {
           this.historyList = response
         })
     },
-
-    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(){},
     //删除
     approve() {},
     listQuery() {},
@@ -656,7 +929,6 @@ export default {
 /deep/.el-form-item__label {
   width: 160px;
 }
-
 //选填
 /deep/.el-form-item {
   width: 50%;
@@ -696,11 +968,17 @@ export default {
   color: #8890b1;
   line-height: 16px;
 }
+.inspector{
+  width: 50%;
+} 
 //质检员
 .inspector .el-form-item__content {
   text-align: left;
   margin-left: 0px;
 }
+/deep/[data-v-d228e17e] .el-form-item__label {
+    width: 60px;
+}
 .small-title {
   position: relative;
   padding: 10px;
@@ -730,7 +1008,7 @@ export default {
   background-color: #f6f7fc;
 }
 /deep/.neifor .el-input--small .el-input__inner {
-  width: 120%;
+  width: 100%;
 }
 .el-input__inner {
   width: 150px;

+ 414 - 66
src/views/warehouse/warehouseManagementPerfectput.vue

@@ -22,7 +22,7 @@
       </el-col>
     </el-row>
 
-    <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
+    <ws-form ref="dataList" :model="dataList" :rules="rules">
       <div class="basicInformation">
         <h2>
           {{ deptBudgetList1.warehouseName }}库
@@ -33,7 +33,7 @@
           <!-- 货名 -->
           <ws-form-item label="货名" span="1">
             <ws-select
-              v-model="deptBudgetList.goodsName"
+              v-model="dataList.goodsName"
               placeholder=""
               class="typeselect"
               @change="selectgoodsName"
@@ -50,7 +50,7 @@
           <ws-form-item label="毛重(吨)" span="1" prop="grossWeight">
             <ws-input
               @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
+              v-model="dataList.grossWeight"
               placeholder="请输入毛重"
               maxlength="20"
               size="small"
@@ -66,7 +66,7 @@
           >
             <ws-input
               @input="tarechange"
-              v-model="deptBudgetList.tare"
+              v-model="dataList.tare"
               placeholder="请输入皮重"
               maxlength="100"
               size="small"
@@ -76,7 +76,8 @@
           <!--净重(吨)-->
           <ws-form-item label="净重(吨)" span="1" prop="netWeight">
             <ws-input
-              v-model.number="deptBudgetList.netWeight"
+            :readonly="readonly"
+              v-model.number="dataList.netWeight"
               placeholder="不可编辑,自动计算"
               type="number"
               maxlength="120"
@@ -86,7 +87,7 @@
           <!-- 品级 -->
           <ws-form-item label="品级" span="1" class="readonly">
             <ws-select
-              v-model="deptBudgetList.grade"
+              v-model="dataList.grade"
               placeholder=""
               class="typeselect"
               @change="selectpackingMethod"
@@ -103,30 +104,30 @@
           <!--经办人-->
           <ws-form-item label="经办人" span="1" prop="agent">
             <ws-input
-              v-model="deptBudgetList.agent"
+              v-model="dataList.agent"
               placeholder="请输入出库经办人姓名"
               maxlength="100"
               size="small"
             />
           </ws-form-item>
-          <!--库日期-->
+          <!--库日期-->
           <ws-form-item
-            label="库日期"
+            label="库日期"
             span="1"
             prop="inOutDate"
             class="deliverydate"
           >
             <ws-date-picker
-              v-model="deptBudgetList.inOutDate"
+              v-model="dataList.inOutDate"
               type="date"
-              placeholder="请选择库日期"
+              placeholder="请选择库日期"
               value-format="yyyy-MM-dd"
             />
           </ws-form-item>
           <!-- 入库类型 -->
-          <ws-form-item label="库类型" span="1">
+          <ws-form-item label="库类型" span="1">
             <ws-select
-              v-model="deptBudgetList.inOutType"
+              v-model="dataList.inOutType"
               placeholder=""
               class="typeselect"
               @change="selectstorageType"
@@ -143,7 +144,7 @@
           <!--车牌号-->
           <ws-form-item label="车牌号" span="1" prop="sourceGoods">
             <ws-input
-              v-model="deptBudgetList.carNo"
+              v-model="dataList.carNo"
               placeholder="请输入车牌号"
               maxlength="20"
               size="small"
@@ -153,7 +154,7 @@
           <!--合同编号-->
           <ws-form-item label="合同编号" span="1" prop="contractNo">
             <ws-input
-              v-model="deptBudgetList.contractNo"
+              v-model="dataList.contractNo"
               placeholder="请输入合同编号"
               maxlength="100"
               size="small"
@@ -168,7 +169,7 @@
         oss-key="mainPlan"
         :comp-id="compId"
         :appendix-ids="appendixIdsAdd"
-        :vesselId="deptBudgetList.addressUrl"
+        :vesselId="dataList.addressUrl"
         :size-limit="size"
         @uploadSuccess="uploadSuccess"
         @onChange="onChange"
@@ -176,10 +177,10 @@
       />
       <div class="small-title">化验数据(选填)</div>
       <div class="inspector">
-        <!--检员-->
+        <!--检员-->
         <ws-form-item label="质检员" span="1" prop="qualityInspector">
           <ws-input
-            v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
+            v-model="dataList.warehouseInOutDetail.qualityInspector"
             placeholder="请输入质检员姓名"
             maxlength="120"
             size="small"
@@ -192,7 +193,7 @@
           <!--水分(%)<=-->
           <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.waterContent"
+              v-model="dataList.warehouseInOutDetail.waterContent"
               placeholder="请输入水分占比"
               maxlength="120"
               size="small"
@@ -201,7 +202,7 @@
           <!--杂质(%)<=-->
           <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.impurity"
+              v-model="dataList.warehouseInOutDetail.impurity"
               placeholder="请输入杂质占比"
               maxlength="120"
               size="small"
@@ -210,7 +211,7 @@
           <!--容重(克/升)>=-->
           <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
+              v-model="dataList.warehouseInOutDetail.bulkDensity"
               placeholder="请输入容重"
               maxlength="120"
               size="small"
@@ -219,7 +220,7 @@
           <!--霉变粒(%)<=-->
           <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
+              v-model="dataList.warehouseInOutDetail.mildewGrain"
               placeholder="请输入霉变粒占比"
               maxlength="120"
               size="small"
@@ -228,7 +229,7 @@
           <!--热损伤(%)<=-->
           <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
+              v-model="dataList.warehouseInOutDetail.jiaorenli"
               placeholder="请输入热损伤占比"
               maxlength="120"
               size="small"
@@ -237,7 +238,7 @@
           <!--不完整粒(%)<=-->
           <ws-form-item label="不完整粒(%)<=" span="1" prop="imperfectGrain">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
+              v-model="dataList.warehouseInOutDetail.imperfectGrain"
               placeholder="请输入不完整粒占比"
               maxlength="120"
               size="small"
@@ -268,6 +269,7 @@
 import { pullDown, addstorageputList } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
+import { mapActions, mapGetters, mapState } from 'vuex'
 import WsUpload from '@/components/WsUpload'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
 import { dayjs, EventBus } from 'base-core-lib'
@@ -285,6 +287,11 @@ export default {
       this.showType = val
     },
   },
+  computed:{
+    ...mapGetters([
+      'deptBudgetList',
+    ]),
+  },
   data() {
     return {
       //弹出框
@@ -299,6 +306,7 @@ export default {
       // 年
       year: '',
       deptBudgetTotal: 0,
+      readonly:true,
       currentPage: 1,
       pageSize: 10,
       searchType: 1,
@@ -312,6 +320,7 @@ export default {
       storageType: [],
       appendixIdsAdd: '',
       uploadSuccess: {},
+      warehouseInOutDetail:{},
       onChange: {},
       deptBudgetList1: [],
       gradeList: [],
@@ -334,7 +343,18 @@ export default {
         month: dayjs().format('MM'),
       },
       contractList: [],
-      deptBudgetList: {
+      dataList: {
+        id:'',
+        grossWeight:'',
+        contractNo:'',
+        tare:'',
+        netWeight:'',
+        grade:'',
+        agent:'',
+        carNo:'',
+        inOutDate:'',
+        inOutType:'',
+        goodsName:'',
         warehouseInOutDetail: {},
       },
       historyList: [],
@@ -346,28 +366,37 @@ export default {
       accessoryTFs: false,
     }
   },
-  mounted() {
-    console.log(this.$route.query)
-    this.deptBudgetList.baseId = this.$route.query.baseId
-    this.deptBudgetList.positionId = this.$route.query.positionId
+   activated() {
     this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
     this.deptBudgetList1.binNumber = this.$route.query.binNumber
     this.getList()
-    this.deptBudgetList.goodsName= this.$route.query.goodsName
-    this.deptBudgetList.grossWeight = this.$route.query.grossWeight
-    this.deptBudgetList.tare = this.$route.query.tare
-    this.deptBudgetList.netWeight = this.$route.query.netWeight
-    this.deptBudgetList.grade = this.$route.query.grade
-    this.deptBudgetList.agent = this.$route.query.agent
-    this.deptBudgetList.carNo = this.$route.query.carNo
-    this.deptBudgetList.inOutDate = this.$route.query.inOutDate
-    this.deptBudgetList.contractNo = this.$route.query.contractNo
-    this.deptBudgetList.inOutType = this.$route.query.inOutType
+    this.dataList.id=this.$route.query.id
+    this.dataList.grossWeight=this.$route.query.grossWeight
+    this.dataList.contractNo = this.$route.query.contractNo
+    this.dataList.baseId = this.$route.query.baseId
+    this.dataList.positionId = this.$route.query.positionId
+    this.dataList.warehouseName = this.$route.query.warehouseName
+    this.dataList.binNumber = this.$route.query.binNumber
+    this.dataList.tare = this.$route.query.tare
+    this.dataList.netWeight = this.$route.query.netWeight
+    this.dataList.grade = this.$route.query.grade
+    this.dataList.agent = this.$route.query.agent
+    this.dataList.carNo = this.$route.query.carNo
+    this.dataList.inOutDate = this.$route.query.inOutDate
+    this.dataList.contractNo = this.$route.query.contractNo
+    this.dataList.inOutType = this.$route.query.inOutType
+    this.dataList.compId = this.$route.query.compId
+    this.dataList.goodsName = this.$route.query.goodsName
+    this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
+    this.dataList.inOutFlag = this.$route.inOutFlag
+    this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
+    this.dataList.statusFlag = this.$route.statusFlag
+    this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
   },
   methods: {
     //返回按钮
     revert() {
-      this.$router.push({ path: 'warehouseManagementNoComplete' })
+      this.$router.go(-1)
     },
     //暂存按钮
     temporaryStorage() {
@@ -377,14 +406,14 @@ export default {
         type: 'warning',
       })
         .then(() => {
-          this.$refs.deptBudgetList.validate((valid) => {
+          this.$refs.dataList.validate((valid) => {
             if (valid) {
-              this.deptBudgetList.compId = sessionStorage.getItem(
+              this.dataList.compId = sessionStorage.getItem(
                 'ws-pf_compId'
               )
-              this.deptBudgetList.inOutFlag = 1
-              this.deptBudgetList.statusFlag = 1
-              addstorageputList(this.deptBudgetList)
+              this.dataList.inOutFlag = 2
+              this.dataList.statusFlag = 1
+              addstorageputList(this.dataList)
                 .toPromise()
                 .then((response) => {
                   this.$message.success('暂存成功')
@@ -402,21 +431,331 @@ export default {
     },
     //提交按钮
     submit() {
-      console.log(123456)
+       if (!this.dataList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.grossWeight) {
+        this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.grossWeight <= 0 ||
+        this.dataList.grossWeight > 10000 ||
+        (String(this.dataList.grossWeight).indexOf('.') != -1 &&
+          String(this.dataList.grossWeight).length -
+            (String(this.dataList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+    
+      if (
+        this.dataList.tare < 0 ||
+        this.dataList.tare > 10000 ||
+        (String(this.dataList.tare).indexOf('.') != -1 &&
+          String(this.dataList.tare).length -
+            (String(this.dataList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.agent) {
+        this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.agent.length < 2 ||
+        this.dataList.agent.length > 10
+      ) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+       if (!this.dataList.grade) {
+        this.$message({
+          message: '品级不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutDate) {
+        this.$message({
+          message: '入库日期不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutType) {
+        this.$message({
+          message: '入库类型不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.carNo) {
+        this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.contractNo) {
+        this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.contractNo.length < 6 ||
+        this.dataList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6-20个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (this.dataList.netWeight > this.$route.query.capacity) {
+        this.$message({
+          message: '入库量大于该仓库容量!',
+          type: 'warning',
+        })
+        return
+      }
+       //自检员
+      if (this.dataList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.dataList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.dataList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.dataList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.waterContent < 1 ||
+          this.dataList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.dataList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.dataList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.dataList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.dataList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.impurity < 1 ||
+          this.dataList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.dataList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+       //霉变
+      if (this.dataList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.mildewGrain).length -
+              (String(
+                this.dataList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+       //热损伤
+      if (this.dataList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.dataList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+        //不完整粒(%)
+      if (this.dataList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完整粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.dataList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完整粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+       if (this.dataList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.bulkDensity < 1 ||
+          this.dataList.warehouseInOutDetail.bulkDensity > 40 ||
+          (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.bulkDensity).length -
+              (String(
+                this.dataList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') +
+                1) >
+              0)
+        ) {
+          this.$message({
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
+            type: 'warning',
+          })
+          return
+        }
+      }
       this.$confirm(`确定提交入库信息`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         type: 'warning',
       })
         .then(() => {
-          this.$refs.deptBudgetList.validate((valid) => {
+          this.$refs.dataList.validate((valid) => {
             if (valid) {
-              this.deptBudgetList.compId = sessionStorage.getItem(
+              this.dataList.compId = sessionStorage.getItem(
                 'ws-pf_compId'
               )
-              this.deptBudgetList.inOutFlag = 1
-              this.deptBudgetList.statusFlag = 3
-              addstorageputList(this.deptBudgetList)
+              this.dataList.inOutFlag = 2
+              this.dataList.statusFlag = 3
+              addstorageputList(this.dataList)
                 .toPromise()
                 .then((response) => {
                   this.$message.success('添加成功')
@@ -434,11 +773,11 @@ export default {
     },
     //暂存按钮
     returnWarehouse() {
-      this.$refs.deptBudgetList.validate((valid) => {
+      this.$refs.dataList.validate((valid) => {
         if (valid) {
-          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
-          this.deptBudgetList.statusFlag = 1
-          addstorageputList(this.deptBudgetList)
+          this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
+          this.dataList.statusFlag = 1
+          addstorageputList(this.dataList)
             .toPromise()
             .then((response) => {
               this.$message.success('添加成功')
@@ -451,37 +790,37 @@ export default {
       })
     },
     tarechange(e) {
-      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+      if (this.dataList.grossWeight && this.dataList.tare) {
+        this.dataList.netWeight = Number(
+          this.dataList.grossWeight - this.dataList.tare
         )
       }
     },
     grossWeightchange(e) {
-      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+      if (this.dataList.grossWeight && this.dataList.tare) {
+        this.dataList.netWeight = Number(
+          this.dataList.grossWeight - this.dataList.tare
         )
       }
     },
     selectgoodsName(e) {
       for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].constValue == e) {
-          this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+          this.dataList.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
+          this.dataList.packingMethodKey = this.packtypeList[i].constKey
         }
       }
     },
     selectstorageType(e) {
       for (var i = 0; i < this.storageType.length; i++) {
         if (this.storageType[i].constValue == e) {
-          this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
+          this.dataList.inOutTypeKey = this.storageType[i].constKey
         }
       }
     },
@@ -646,7 +985,16 @@ export default {
 /deep/.el-form-item__label {
   width: 160px;
 }
-
+.inspector{
+  width: 50%;
+} 
+//质检员
+/deep/[data-v-58803672] .el-form-item__label {
+    width: 60px;
+}
+[data-v-58803672] .el-form-item__label {
+    width: 60px;
+}
 //选填
 /deep/.el-form-item {
   width: 50%;
@@ -720,7 +1068,7 @@ export default {
   background-color: #f6f7fc;
 }
 /deep/.neifor .el-input--small .el-input__inner {
-  width: 120%;
+  width: 100%;
 }
 .el-input__inner {
   width: 150px;

+ 459 - 60
src/views/warehouse/warehouseManagementPut.vue

@@ -26,12 +26,12 @@
       <div class="basicInformation">
         <h2>
           <img
-          style="position: relative; top: 2px"
-          width="19"
-          height="19"
-          src="../../../public/img/cangku.png"
-          alt=""
-        />
+            style="position: relative; top: 2px"
+            width="19"
+            height="19"
+            src="../../../public/img/cangku.png"
+            alt=""
+          />
           {{ deptBudgetList.warehouseName }}库
           <span class="position"> {{ deptBudgetList.binNumber }}仓位 </span>
         </h2>
@@ -186,7 +186,7 @@
           <ws-input
             v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
             placeholder="请输入质检员姓名"
-            maxlength="120"
+            maxlength="10"
             size="small"
           />
         </ws-form-item>
@@ -199,7 +199,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.waterContent"
               placeholder="请输入水分占比"
-              maxlength="120"
+              maxlength="40"
               size="small"
             />
           </ws-form-item>
@@ -208,7 +208,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.impurity"
               placeholder="请输入杂质占比"
-              maxlength="120"
+              maxlength="40"
               size="small"
             />
           </ws-form-item>
@@ -217,7 +217,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
               placeholder="请输入容重"
-              maxlength="120"
+              maxlength="40"
               size="small"
             />
           </ws-form-item>
@@ -226,7 +226,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
               placeholder="请输入霉变粒占比"
-              maxlength="120"
+              maxlength="40"
               size="small"
             />
           </ws-form-item>
@@ -235,7 +235,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
               placeholder="请输入热损伤占比"
-              maxlength="120"
+              maxlength="40"
               size="small"
             />
           </ws-form-item>
@@ -244,7 +244,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
               placeholder="请输入不完整粒占比"
-              maxlength="120"
+              maxlength="40"
               size="small"
             />
           </ws-form-item>
@@ -388,8 +388,8 @@ export default {
         })
         return
       }
-      if(!this.deptBudgetList.grossWeight){
-         this.$message({
+      if (!this.deptBudgetList.grossWeight) {
+        this.$message({
           message: '毛重不能为空',
           type: 'warning',
         })
@@ -409,8 +409,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.tare){
-         this.$message({
+      if (!this.deptBudgetList.tare) {
+        this.$message({
           message: '皮重不能为空',
           type: 'warning',
         })
@@ -430,8 +430,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.agent){
-         this.$message({
+      if (!this.deptBudgetList.agent) {
+        this.$message({
           message: '经办人不能为空',
           type: 'warning',
         })
@@ -447,8 +447,29 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.carNo){
-         this.$message({
+       if (!this.deptBudgetList.grade) {
+        this.$message({
+          message: '品级不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.inOutDate) {
+        this.$message({
+          message: '入库日期不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.inOutType) {
+        this.$message({
+          message: '入库类型不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.carNo) {
+        this.$message({
           message: '车牌号不能为空',
           type: 'warning',
         })
@@ -461,8 +482,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.contractNo){
-         this.$message({
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
           message: '合同编号不能为空',
           type: 'warning',
         })
@@ -479,15 +500,206 @@ export default {
         return
       }
 
-      
-      if(this.deptBudgetList.netWeight > this.$route.query.capacity){
+      if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
         this.$message({
           message: '入库量大于该仓库容量!',
           type: 'warning',
         })
         return
       }
-      this.$confirm(`确定提交入库信息`, {
+       //自检员
+      if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+       //霉变
+      if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+       //热损伤
+      if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+        //不完整粒(%)
+      if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完整粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完整粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+       if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') +
+                1) >
+              0)
+        ) {
+          this.$message({
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      this.deptBudgetList.id = this.$route.query.id
+        this.$confirm(`确定提交入库信息`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         type: 'warning',
@@ -515,17 +727,19 @@ export default {
         .catch(() => {
           return false
         })
+    
+      
     },
     temporaryStorage() {
-       if (!this.deptBudgetList.goodsName) {
+      if (!this.deptBudgetList.goodsName) {
         this.$message({
           message: '货名不能为空',
           type: 'warning',
         })
         return
       }
-      if(!this.deptBudgetList.grossWeight){
-         this.$message({
+      if (!this.deptBudgetList.grossWeight) {
+        this.$message({
           message: '毛重不能为空',
           type: 'warning',
         })
@@ -545,8 +759,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.tare){
-         this.$message({
+      if (!this.deptBudgetList.tare) {
+        this.$message({
           message: '皮重不能为空',
           type: 'warning',
         })
@@ -566,8 +780,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.agent){
-         this.$message({
+      if (!this.deptBudgetList.agent) {
+        this.$message({
           message: '经办人不能为空',
           type: 'warning',
         })
@@ -583,8 +797,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.carNo){
-         this.$message({
+      if (!this.deptBudgetList.carNo) {
+        this.$message({
           message: '车牌号不能为空',
           type: 'warning',
         })
@@ -597,8 +811,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.contractNo){
-         this.$message({
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
           message: '合同编号不能为空',
           type: 'warning',
         })
@@ -614,13 +828,204 @@ export default {
         })
         return
       }
-       if(this.deptBudgetList.netWeight > this.$route.query.capacity){
+      if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
         this.$message({
           message: '入库量大于该仓库容量!',
           type: 'warning',
         })
         return
       }
+      //自检员
+      if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+       //霉变
+      if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+       //热损伤
+      if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+        //不完整粒(%)
+      if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完整粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完整粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+       if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') +
+                1) >
+              0)
+        ) {
+          this.$message({
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
+            type: 'warning',
+          })
+          return
+        }
+      }
       this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
@@ -781,6 +1186,7 @@ export default {
     }
   }
 }
+
 .title {
   position: relative;
   padding-left: 10px;
@@ -815,9 +1221,7 @@ export default {
   height: 2000px;
   margin: 0 auto;
 }
-/deep/.el-form-item__label {
-  width: 160px;
-}
+
 //选填
 /deep/.el-form-item {
   width: 50%;
@@ -839,25 +1243,15 @@ export default {
 }
 //仓位
 
-.position{
-background: #AFB5CB;
-border-radius: 2px;
-font-size: 12px;
-color: #FFFFFF;
-line-height: 20px;
-display: inline-grid;
-padding: 2px 4px;
+.position {
+  background: #afb5cb;
+  border-radius: 2px;
+  font-size: 12px;
+  color: #ffffff;
+  line-height: 20px;
+  display: inline-grid;
+  padding: 2px 4px;
 }
-// .position {
-//   width: 52px;
-//   height: 20px;
-//   background: #afb5cb;
-//   border-radius: 2px;
-//   font-size: 12px;
-//   font-family: PingFangSC-Medium, PingFang SC;
-//   color: #ffffff;
-//   line-height: 20px;
-// }
 //表格文字
 /deep/.ws-info-table .el-form-item .el-form-item__label {
   text-align: left;
@@ -867,6 +1261,9 @@ padding: 2px 4px;
   color: #8890b1;
   line-height: 16px;
 }
+.inspector{
+  width: 50%;
+} 
 //质检员
 .inspector .el-form-item__content {
   text-align: left;
@@ -902,7 +1299,9 @@ padding: 2px 4px;
   background-color: #f6f7fc;
 }
 
-/deep/.neifor .el-input--small .el-input__inner{
+/deep/.neifor .el-input--small .el-input__inner {
   width: 100%;
 }
+
+
 </style>

+ 1 - 1
src/views/warehouse/warehouseManagementRecord.vue

@@ -187,7 +187,7 @@
               <span style="color: #8890b1">{{ scope.row.carNo }}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="qualityInspector" label="经办人">
+          <el-table-column prop="agent" label="经办人">
           </el-table-column>
           <el-table-column prop="buyer" label="内勤"> </el-table-column>
           <el-table-column prop="addressUrl" label="附件">