Przeglądaj źródła

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

mxx 4 lat temu
rodzic
commit
af1774733d

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

@@ -4,7 +4,6 @@ export const API_POST_ADD_WAREHOUSE_BASEINFO = '/warehouseBaseInfo/api/addWareho
 export const API_GET_WAREHOUSE_LOOK = '/warehouseBaseInfo/getWarehouse'
 //仓库名称下拉
 export const API_GET_WAREHOUSE_CUSTOMDROPDOWN = '/warehouseBaseInfo/selectWarehouse'
-
 //删除
 export const API_POST_WAREHOUSE_DELETE = '/warehouseBaseInfo/api/deleteWarehouse'
 //删除仓库列表
@@ -24,7 +23,6 @@ export const API_GET_WAREHOUSE_NAME = '/warehousePositionStorageInfo/selectGoods
 // 货名等下拉
 export const API_GET_CUSTOMDROPDOWN_CUSTOMDROPDOWN = `/commonSysParameter/getInfo`
 // 入库添加
-
 export const API_POST_STORAGE_PUT = `/warehouseInOutInfo/InOutWarehouse`
 //流转记录
 export const API_GET_SELECT_INFO = `/warehouseInOutInfo/selectInfo`
@@ -36,3 +34,5 @@ export const API_POST_STORAGE_IOSS = '/warehouseInventoryCountInfo/addInventory'
 export const API_GET_WAREHOUSE_COMPLETE = '/warehouseInOutInfo/selectWarehouseInOutInfo'
 // 编辑删除仓位
 export const API_POST_WAREHOUSE_DEL_POSITION = '/warehousePositionInfo/api/deleteWarehousePosition'
+//删除待完善记录
+export const API_POST_WAREHOUSE_DEL_INOUTINFO = '/warehouseInOutInfo/api/deleteWarehouse'

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

@@ -17,7 +17,8 @@ import {
     API_GET_WAREHOUSE_INVENTORYCOUNT,
     API_POST_STORAGE_IOSS,
     API_GET_WAREHOUSE_COMPLETE,
-    API_POST_WAREHOUSE_DEL_POSITION
+    API_POST_WAREHOUSE_DEL_POSITION,
+    API_POST_WAREHOUSE_DEL_INOUTINFO
 } from '@/api/V2/warehouse'
 // 列表
 export const getList = appRx.get(API_GET_WAREHOUSE_BASEINFO, errorCatcher, errorHandle, filter)
@@ -28,7 +29,6 @@ export const getLook = appRx.get(API_GET_WAREHOUSE_LOOK, errorCatcher, errorHand
 //仓库下拉
 export const xiala = appRx.get(API_GET_WAREHOUSE_CUSTOMDROPDOWN, errorCatcher, errorHandle, filter)
 //删除
-
 export const deletewarehouse = appRx.post(API_POST_WAREHOUSE_DELETE, errorCatcher, errorHandle, filter)
 //删除库房列表
 export const delectlist = appRx.get(API_GET_WAREHOUSE_DELETELIST, errorCatcher, errorHandle, filter)
@@ -53,8 +53,9 @@ export const submitioss = appRx.post(API_POST_STORAGE_IOSS, errorCatcher, errorH
 //待完善记录
 export const complete = appRx.get(API_GET_WAREHOUSE_COMPLETE, errorCatcher, errorHandle, filter)
 // 编辑删除仓位
-
 export const delPosition = appRx.post(API_POST_WAREHOUSE_DEL_POSITION, errorCatcher, errorHandle, filter)
- 
+//删除待完善记录
+export const delInOut = appRx.post(API_POST_WAREHOUSE_DEL_INOUTINFO, errorCatcher, errorHandle, filter)
+
 
 

+ 120 - 44
src/views/warehouse/warehouseManagementDelivery.vue

@@ -256,7 +256,6 @@
 </template>
 <script>
 import { pullDown, addstorageputList, goodsname } 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'
@@ -351,6 +350,103 @@ export default {
       this.$router.push({ path: 'warehouseManagementList' })
     },
     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
+      }
       this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
@@ -398,10 +494,14 @@ export default {
       }
       if (
         this.deptBudgetList.grossWeight < 0 ||
-        this.deptBudgetList.grossWeight >= 10000
+        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: '毛重输入错误!',
+          message: '毛重输入错误',
           type: 'warning',
         })
         return
@@ -413,9 +513,16 @@ export default {
         })
         return
       }
-      if (this.deptBudgetList.tare < 0 || this.deptBudgetList.tare >= 10000) {
+     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: '皮重输入错误!',
+          message: '皮重输入错误',
           type: 'warning',
         })
         return
@@ -509,7 +616,13 @@ export default {
         })
         return
       }
-      this.$refs.deptBudgetList.validate((valid) => {
+       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 = 1
@@ -525,6 +638,7 @@ export default {
           return false
         }
       })
+        })  
     },
     tarechange(e) {
       if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
@@ -621,44 +735,6 @@ export default {
         query: { id: row.id },
       })
     },
-
-    // 关闭 dialog时 处理文件url 初始化upload组件
-    handleCloe() {
-      this.dialogViewSpareMoney = false
-    },
-    history(row) {
-      console.log(row)
-      billoperatehis({ id: row.id })
-        .toPromise()
-        .then((response) => {
-          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() {},

+ 5 - 18
src/views/warehouse/warehouseManagementIoss.vue

@@ -96,12 +96,11 @@ import {
   ioss,
   submitioss,
 } 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, fmoney, EventBus } from 'base-core-lib'
-import { dayjs, EventBus } from 'base-core-lib'
+import { dayjs} from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   components: {
@@ -318,18 +317,7 @@ export default {
         }
       }
     },  
-    // 关闭 dialog时 处理文件url 初始化upload组件
-    handleCloe() {
-      this.dialogViewSpareMoney = false
-    },
-    history(row) {
-      console.log(row)
-      billoperatehis({ id: row.id })
-        .toPromise()
-        .then((response) => {
-          this.historyList = response
-        })
-    },
+   
     // deletecontract(){},
     //删除
     approve() {},
@@ -366,14 +354,13 @@ export default {
 
 //仓位
 .position{
- width: 52px;
-height: 20px;
 background: #AFB5CB;
 border-radius: 2px;
 font-size: 12px;
-font-family: PingFangSC-Medium, PingFang SC;
 color: #FFFFFF;
 line-height: 20px;
+display: inline-grid;
+    padding: 2px 4px;
 }
 //表格
 .readonly{

+ 7 - 11
src/views/warehouse/warehouseManagementNoComplete.vue

@@ -108,7 +108,6 @@
             >关闭</el-button
           >    
         </div>
-     
     </div>
      </ws-form>
   </div>
@@ -116,18 +115,17 @@
 <script>
 import {
   complete,
-  getList,
   export1,
-  editstatus,
   billoperatehis,
-  deletewarehouse,
-  warehouseName,
-  addstorageputList,
+  delInOut,
+  // deletewarehouse,
+  // warehouseName,
+  // addstorageputList,
 } 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'
+import { dayjs} from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   components: {
@@ -164,8 +162,6 @@ export default {
       startDate: null,
       endDate: null,
       deletewarehouse:[],
-      pageSize:10,
-      currentPage:'1',
       improved:[],
       row:[],
       deptBudgetList1:[],
@@ -184,7 +180,7 @@ export default {
       contractList: [],
       deptBudgetList: {},
       historyList: [],
-      deletewarehouse:[],
+ 
     // inOutDate:null,
       pickerBeginDateBefore: {
         disabledDate: (time) => {
@@ -309,7 +305,7 @@ export default {
         type: 'warning',
       })
         .then(() => {
-        deletewarehouse({ id:row.id})
+       delInOut({id:row.id})
             .toPromise()
             .then((response) => {
               this.$notify.success({

+ 84 - 20
src/views/warehouse/warehouseManagementPut.vue

@@ -271,7 +271,6 @@
 </template>
 <script>
 import { pullDown, addstorageputList } 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'
@@ -353,7 +352,6 @@ export default {
     }
   },
   mounted() {
-    console.log(this.$route.query)
     this.deptBudgetList.baseId = this.$route.query.baseId
     this.deptBudgetList.positionId = this.$route.query.positionId
     this.deptBudgetList.warehouseName = this.$route.query.warehouseName
@@ -390,6 +388,13 @@ export default {
         })
         return
       }
+      if(!this.deptBudgetList.grossWeight){
+         this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
       if (
         this.deptBudgetList.grossWeight < 0 ||
         this.deptBudgetList.grossWeight > 10000 ||
@@ -403,6 +408,13 @@ export default {
           type: 'warning',
         })
         return
+      }
+       if(!this.deptBudgetList.tare){
+         this.$message({
+          message: '皮重不能为空',
+          type: 'warning',
+        })
+        return
       }
       if (
         this.deptBudgetList.tare < 0 ||
@@ -417,9 +429,16 @@ export default {
           type: 'warning',
         })
         return
+      }
+       if(!this.deptBudgetList.agent){
+         this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
       }
       if (
-        this.deptBudgetList.car.length < 2 ||
+        this.deptBudgetList.agent.length < 2 ||
         this.deptBudgetList.agent.length > 10
       ) {
         this.$message({
@@ -427,6 +446,13 @@ export default {
           type: 'warning',
         })
         return
+      }
+       if(!this.deptBudgetList.carNo){
+         this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
       }
       if (this.deptBudgetList.carNo.length > 7) {
         this.$message({
@@ -434,6 +460,13 @@ export default {
           type: 'warning',
         })
         return
+      }
+       if(!this.deptBudgetList.contractNo){
+         this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
       }
       if (
         this.deptBudgetList.contractNo.length < 6 ||
@@ -475,13 +508,20 @@ export default {
         })
     },
     temporaryStorage() {
-      if (!this.deptBudgetList.goodsName) {
+       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 ||
@@ -495,6 +535,13 @@ export default {
           type: 'warning',
         })
         return
+      }
+       if(!this.deptBudgetList.tare){
+         this.$message({
+          message: '皮重不能为空',
+          type: 'warning',
+        })
+        return
       }
       if (
         this.deptBudgetList.tare < 0 ||
@@ -509,9 +556,16 @@ export default {
           type: 'warning',
         })
         return
+      }
+       if(!this.deptBudgetList.agent){
+         this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
       }
       if (
-        this.deptBudgetList.car.length < 2 ||
+        this.deptBudgetList.agent.length < 2 ||
         this.deptBudgetList.agent.length > 10
       ) {
         this.$message({
@@ -519,6 +573,13 @@ export default {
           type: 'warning',
         })
         return
+      }
+       if(!this.deptBudgetList.carNo){
+         this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
       }
       if (this.deptBudgetList.carNo.length > 7) {
         this.$message({
@@ -526,6 +587,13 @@ export default {
           type: 'warning',
         })
         return
+      }
+       if(!this.deptBudgetList.contractNo){
+         this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
       }
       if (
         this.deptBudgetList.contractNo.length < 6 ||
@@ -663,17 +731,16 @@ export default {
     },
 
     // 关闭 dialog时 处理文件url 初始化upload组件
-    handleCloe() {
-      this.dialogViewSpareMoney = false
-    },
-    history(row) {
-      console.log(row)
-      billoperatehis({ id: row.id })
-        .toPromise()
-        .then((response) => {
-          this.historyList = response
-        })
-    },
+    // handleCloe() {
+    //   this.dialogViewSpareMoney = false
+    // },
+    // history(row) {
+    //   billoperatehis({ id: row.id })
+    //     .toPromise()
+    //     .then((response) => {
+    //       this.historyList = response
+    //     })
+    // },
     // deletecontract(){},
     //删除
     approve() {},
@@ -757,15 +824,13 @@ export default {
 //仓位
 
 .position{
-
 background: #AFB5CB;
 border-radius: 2px;
 font-size: 12px;
-font-family: PingFangSC-Medium, PingFang SC;
 color: #FFFFFF;
 line-height: 20px;
 display: inline-grid;
-    padding: 2px 4px;
+padding: 2px 4px;
 }
 // .position {
 //   width: 52px;
@@ -776,7 +841,6 @@ display: inline-grid;
 //   font-family: PingFangSC-Medium, PingFang SC;
 //   color: #ffffff;
 //   line-height: 20px;
-
 // }
 //表格文字
 /deep/.ws-info-table .el-form-item .el-form-item__label {