mxx 4 سال پیش
والد
کامیت
fc9415cad1

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

@@ -1,5 +1,12 @@
 // 司机列表
 export const API_GET_TRAN_DRIVERINFO = '/driverViewInfo/selectDriverInfoPage'
-export const API_POST_TRAN_DRIVERINFOADD = '/driverViewInfo/api/addInfo'
 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'
+// 司机管理查看
+export const API_GET_DRIVERINFO_GETDRIVER = '/driverViewInfo/getDriver'
+// 司机管理-删除
+export const API_POST_DELETE_DRIVER = '/driverViewInfo/api/deleteDriver'
+//运输任务查看
+export const API_POST_TRAN_LOOK = '/tranTaskInfo/getTranTask'

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

@@ -1,3 +1,4 @@
+
 export const API_GET_WAREHOUSE_BASEINFO = '/warehouseBaseInfo/selectWarehouseViewinfo'
 export const API_POST_ADD_WAREHOUSE_BASEINFO = '/warehouseBaseInfo/api/addWarehouse'
 //仓库列表查看

+ 2 - 2
src/lang/zh.js

@@ -488,7 +488,7 @@
     salesContractAdd: '销售合同添加',
     purchaseContractAdd: '采购合同添加',
     purchaseContractEdit: '采购合同编辑',
-    //仓库管理
+    //仓库管理
     warehouseManagementList: '仓库管理',
      warehouseManagementAdd: '仓库管理添加',
     warehouseManagementEdit: '仓库管理编辑',
@@ -4696,7 +4696,7 @@
   //仓库管理
   warehouseManagement: {
     warehouseManagementList: '仓库管理',
-     warehouseManagementAdd: '仓库管理添加',
+    warehouseManagementAdd: '仓库管理添加',
     warehouseManagementEdit: '仓库管理编辑',
     warehouseManagementPut: '入库',
     warehouseManagementDelivery: '出库',

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

@@ -6,6 +6,10 @@ import {
     API_POST_TRAN_DRIVERINFOADD,
     API_GET_TRAN_LIST,
     API_POST_TRAN_ADD,
+    API_POST_TRAN_LOOK,
+    API_GET_DRIVERINFO_GETDRIVER,
+    API_POST_DELETE_DRIVER
+
 } from '@/api/V2/transport'
 // 司机列表
 export const selectDriver = appRx.get(API_GET_TRAN_DRIVERINFO, errorCatcher, errorHandle, filter)
@@ -15,3 +19,12 @@ export const addDriver = appRx.post(API_POST_TRAN_DRIVERINFOADD, errorCatcher, e
 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)
+// 司机管理-删除
+export const delDriver = appRx.post(API_POST_DELETE_DRIVER, errorCatcher, errorHandle, filter)
+//运输任务查看
+export const lookTranTask = appRx.get(API_POST_TRAN_LOOK,errorCatcher, errorHandle, filter) 
+

+ 63 - 0
src/views/tranManagement/component/routers/route.js

@@ -25,6 +25,7 @@ const tranManagementRouter = {
         permissicon: [],
         keepAlive: true
       },
+
       // hidden: true
     },
     //火运调度
@@ -41,6 +42,68 @@ const tranManagementRouter = {
         keepAlive: true
       },
       
+
+    },
+    //添加司机
+    {
+      path: 'tranManagementDriverAdd',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementDriverAdd'),
+      name: 'tranManagementDriverAdd',
+      meta: {
+        title: 'tranManagementDriverAdd',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementDriverAdd',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
+    //运输查看
+    {
+      path: 'tranManagementLook',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementLook'),
+      name: 'tranManagementLook',
+      meta: {
+        title: 'tranManagementLook',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementLook',
+        permissicon: [],
+        keepAlive: true
+      },
+      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
+
     },
     //汽运调度
     {

+ 1 - 1
src/views/tranManagement/tranManagementLook.vue

@@ -226,7 +226,7 @@
   </div>
 </template>
 <script>
-import { pullDown, addstorageputList } from '@/model/warehouse/index'
+import { lookTranTask ,gain } from '@/model/transport/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'

+ 1 - 5
src/views/warehouse/component/router/index.js

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

+ 27 - 24
src/views/warehouse/warehouseManagementAdd.vue

@@ -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 ,xiala} 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,7 @@ export default {
       list: [],
     }
   },
-  activated(){
+  activated() {
     this.loaddata()
   },
   computed: {
@@ -309,8 +315,10 @@ export default {
       this.selectedOptions = value
     },
     returnsales() {
-      this.$router.push({ path: 'warehouseManagementList' })
       this.deptBudgetList = {}
+      this.freightspace = {}
+      this.selectedOptions = ""
+      this.$router.push({ path: 'warehouseManagementList' })
     },
     // confirmPosition() {
     //   this.draggable = false
@@ -329,34 +337,28 @@ export default {
     onChange(files) {
       this.fileNum = files
       this.$refs.upload.handleSaveBill().then((res) => {
-        console.log(files)
       })
     },
-     loaddata() {
-      // 仓库名称
-      xiala({ compId: sessionStorage.getItem('ws-pf_compId') })
-        .toPromise()
-        .then((response) => {
-          this.packtypeList = response
-        })
-    },
 
     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',
@@ -373,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',
@@ -394,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',
@@ -445,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 =
@@ -460,8 +461,10 @@ export default {
                 .toPromise()
                 .then((response) => {
                   this.$message.success('添加成功')
-                  this.$router.push({ path: 'warehouseManagementList' })
                   this.deptBudgetList = {}
+                  this.freightspace = {}
+                  this.selectedOptions = ""
+                  this.$router.push({ path: 'warehouseManagementList' })
                 })
             } else {
               EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))

+ 3 - 0
src/views/warehouse/warehouseManagementDelivery.vue

@@ -1234,6 +1234,9 @@ export default {
   color: #8890b1;
   line-height: 16px;
 }
+.inspector{
+  width: 50%;
+} 
 //质检员
 .inspector .el-form-item__content {
   text-align: left;

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

@@ -269,8 +269,8 @@ computed : {
   methods: {
     //返回按钮
     returnWarehouse() {
-      this.$router.push({ path: 'warehouseManagementList' })
       this.deptBudgetList = {}
+      this.$router.push({ path: 'warehouseManagementList' })   
     },
     marker: function (item) {
       this.deptBudgetList.warehousePositioning =
@@ -470,8 +470,8 @@ computed : {
             .toPromise()
             .then((response) => {
               this.$message.success('编辑成功')     
+                            this.deptBudgetList = {}
               this.$router.push({ path: 'warehouseManagementList' })
-              this.deptBudgetList = {}
             })
         } else {
           //EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))

+ 46 - 43
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
@@ -177,7 +177,7 @@ export default {
       selectpackingMethod: {},
       goodnameList: [],
       size: 10,
-
+      
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       packtypeList: {},
@@ -250,7 +250,7 @@ export default {
       }
       // this.deptBudgetList.inventoryRatio = this.deptBudgetList.inventoryRatio.toFixed(3)
       //  this.deptBudgetList.inventoryRatio = num
-       return num
+      return num
     },
   },
   activated() {
@@ -267,23 +267,43 @@ export default {
     this.deptBudgetList1.positionId = this.deptBudgetList.positionId
     this.loaddata()
     this.showType = this.isShow
-    console.log(this.deptBudgetList)
   },
   methods: {
     //返回按钮
     returnWarehouse() {
-       this.deptBudgetList= {}
+      this.deptBudgetList = {}
       this.$router.push({ path: 'warehouseManagementList' })
     },
     //提交按钮
     submit() {
-      if(this.deptBudgetList.physicalInventory <= 0){
+      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: '请填写实际库存!',
+          message: '实际库存输入错误!',
           type: 'warning',
         })
         return
       }
+      if (
+        this.deptBudgetList.cumulativeStockIn -
+          this.deptBudgetList.physicalInventory <=
+        0
+      ) {
+        return
+      }
 
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
@@ -295,11 +315,15 @@ export default {
             this.deptBudgetList.cumulativeStockOut -
             this.deptBudgetList.physicalInventory
           this.deptBudgetList.inventoryRatio =
-            (this.deptBudgetList.cumulativeStockIn -
-              this.deptBudgetList.cumulativeStockOut -
-              this.deptBudgetList.physicalInventory) /
-            (this.deptBudgetList.cumulativeStockIn -
-              this.deptBudgetList.physicalInventory)
+            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
@@ -309,14 +333,12 @@ export default {
             if (
               this.goodnameList[i].goodsName == this.deptBudgetList.goodsName
             ) {
-              this.deptBudgetList.goodsNameKey = this.goodnameList[
-                i
-              ].goodsNameKey
+              this.deptBudgetList.goodsNameKey =
+                this.goodnameList[i].goodsNameKey
             }
           }
           this.deptBudgetList.compId = this.compId
           this.deptBudgetList.contractType = 1
-                  console.log(this.deptBudgetList)
           submitioss(this.deptBudgetList)
             .toPromise()
             .then((response) => {
@@ -366,7 +388,7 @@ export default {
       this.getList()
     },
     changeioss(e) {
-      if(!this.deptBudgetList.baseId){
+      if (!this.deptBudgetList.baseId) {
         this.deptBudgetList.baseId = this.$route.query.baseId
         this.deptBudgetList.positionId = this.deptBudgetList1.positionId
         this.deptBudgetList.binNumber = this.deptBudgetList1.binNumber
@@ -379,18 +401,18 @@ export default {
       this.ioss()
     },
     ioss() {
-      ioss({baseId:this.deptBudgetList.baseId,
-positionId: this.deptBudgetList.positionId,
-goodsNameKey:this.deptBudgetList.goodsNameKey,
-goodsName:this.deptBudgetList.goodsName,
-})
+      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
         })
     },
     loaddata() {
-     
       // 货名
       goodsname({ positionId: this.$route.query.positionId })
         .toPromise()
@@ -405,25 +427,6 @@ goodsName:this.deptBudgetList.goodsName,
         }
       }
     },
-    // // 关闭 dialog时 处理文件url 初始化upload组件
-    // handleCloe() {
-    //   this.dialogViewSpareMoney = false
-    // },
-    // history(row) {
-    //   console.log(row)
-    //   billoperatehis({ id: row.id })
-    //     .toPromise()
-    //     .then((response) => {
-    //       this.historyList = response
-    //     })
-    // },
-
-    //删除
-    // approve() {},
-    // listQuery() {},
-    // total() {},
-    // clearfiltQuery() {},
-    // selectCrtDuty() {},
   },
 }
 </script>

+ 1 - 0
src/views/warehouse/warehouseManagementIossRecord.vue

@@ -167,6 +167,7 @@ export default {
   },
   methods: {
     returnWarehouse() {
+      
       this.$router.go(-1)
     },
     dateFormat(fmt, date) {

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

@@ -1,5 +1,6 @@
 <!--仓库管理-->
 <template>
+   
   <div>
     <BaseHeaderLayout :leftSpan="20">
       <template slot="left">
@@ -78,7 +79,7 @@
         style="width: 100%; margin-top: 20px"
         height="780"
       >
-        <el-table-column prop="warehouseName" label="库房名" width="80">
+        <el-table-column prop="warehouseName" label="库房名" width="80" >
         </el-table-column>
         <el-table-column prop="binNumber" label="仓位编号" width="80">
         </el-table-column>
@@ -175,7 +176,7 @@
 </template>
 <script>
 import {
-  getList,
+   getList,
   export1,
   editstatus,
   billoperatehis,
@@ -260,7 +261,6 @@ export default {
     },
     //入库
     warehousing(item) {
-     
       var free = 0
       for (var i = 0; i < item.warehouseNumViewList.length; i++) {
         free += Number(item.warehouseNumViewList[i].storage)
@@ -330,9 +330,7 @@ export default {
           baseId: item.warehouseId,
           positionId: item.binNumberId,
           warehouseName: item.warehouseName,
-        },
-        params: {
-          remark: item.remark,
+           remark: item.remark,
           binNumber: item.binNumber,
           capacity: item.capacity,
         },
@@ -561,8 +559,7 @@ export default {
   -webkit-line-clamp: 10;
   max-height: 400px;
 }
-.record,
-.adjustment {
+.record ,.adjustment {
   display: inline-block;
   color: #5878e8;
   padding: 0 4px !important;

+ 21 - 13
src/views/warehouse/warehouseManagementLook.vue

@@ -61,7 +61,9 @@
           </ws-form-item>
           <!--仓库所在地-->
           <ws-form-item label="仓库所在地" span="1" prop="warehouseLocation">
-            {{ deptBudgetList.warehousePrivate }}{{deptBudgetList.warehouseCity}}{{deptBudgetList.warehouseArea}}
+            {{ deptBudgetList.warehousePrivate
+            }}{{ deptBudgetList.warehouseCity
+            }}{{ deptBudgetList.warehouseArea }}
           </ws-form-item>
           <!--详细地址-->
           <ws-form-item
@@ -99,8 +101,7 @@
               {{ item.maxStorage }}
             </ws-form-item>
             <!--现有储量-->
-            <ws-form-item label="现有储量" span="1" prop="nowStorage">
-    
+            <ws-form-item :label="wwss" span="1" prop="nowStorage" >
               {{ item.nowStorage }}
             </ws-form-item>
             <!--备注(选填)-->
@@ -142,6 +143,7 @@ export default {
     isShow(val) {
       this.showType = val
     },
+ 
   },
   data() {
     return {
@@ -192,17 +194,23 @@ export default {
     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
+  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() {

+ 3 - 0
src/views/warehouse/warehouseManagementPerfectDelivery.vue

@@ -968,6 +968,9 @@ export default {
   color: #8890b1;
   line-height: 16px;
 }
+.inspector{
+  width: 50%;
+} 
 //质检员
 .inspector .el-form-item__content {
   text-align: left;

+ 3 - 1
src/views/warehouse/warehouseManagementPerfectput.vue

@@ -985,7 +985,9 @@ export default {
 /deep/.el-form-item__label {
   width: 160px;
 }
-
+.inspector{
+  width: 50%;
+} 
 //质检员
 /deep/[data-v-58803672] .el-form-item__label {
     width: 60px;

+ 3 - 0
src/views/warehouse/warehouseManagementPut.vue

@@ -1261,6 +1261,9 @@ export default {
   color: #8890b1;
   line-height: 16px;
 }
+.inspector{
+  width: 50%;
+} 
 //质检员
 .inspector .el-form-item__content {
   text-align: left;

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

@@ -30,8 +30,8 @@
           src="../../../public/img/cangku.png"
           alt=""
         />
-        <span style="color: #323233">{{ deptBudgetList.warehouseName }}</span>
-        <span class="ware">{{ binNumber }}仓位(容量{{ capacity }}吨)</span>
+        <span style="color: #323233">{{ deptBudgetList.warehouseName }}</span>
+        <span class="ware">{{binNumber}}仓位(容量{{capacity}}吨)</span>
       </h2>
       <p
         style="
@@ -41,7 +41,7 @@
           width: 245px;
         "
       >
-        备注:{{ remark }}
+        备注:{{remark }}
       </p>
 
       <ws-form ref="deptBudgetList" :model="deptBudgetList">
@@ -295,6 +295,7 @@ export default {
       submitType: true,
       selectpackingMethod: {},
       size: 10,
+     deptBudgetList1: {},
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       packtypeList: {},
@@ -317,14 +318,14 @@ export default {
       accessoryTFs: false,
     }
   },
+ 
   activated() {
     this.deptBudgetList.baseId = this.$route.query.baseId
     this.deptBudgetList.positionId = this.$route.query.positionId
     this.deptBudgetList.warehouseName = this.$route.query.warehouseName
-    this.remark = this.$route.params.remark
-    this.binNumber = this.$route.params.binNumber
-    this.capacity = this.$route.params.capacity
-    console.log(111)
+    this.remark = this.$route.query.remark
+    this.binNumber = this.$route.query.binNumber
+    this.capacity = this.$route.query.capacity
     this.getList()
     this.showType = this.isShow
   },