瀏覽代碼

前端sdy

zhongtianhaoyuan 4 年之前
父節點
當前提交
b059f47eb4

+ 13 - 3
src/views/warehouse/warehouseManagementAdd.vue

@@ -131,7 +131,7 @@
           <ws-form-item label="备注(选项)" span="1" prop="placeDelivery">
             <ws-input
               v-model="item.remark"
-              placeholder="请输入交货地"
+              placeholder="请输入备注"
               maxlength="20"
               size="small"
             />
@@ -188,7 +188,7 @@
 //  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 +264,9 @@ export default {
       list: [],
     }
   },
-  activated() {},
+  activated(){
+    this.loaddata()
+  },
   computed: {
     totalStorage: function () {
       var maxStorage = 0
@@ -329,6 +331,14 @@ export default {
         console.log(files)
       })
     },
+     loaddata() {
+      // 仓库名称
+      xiala({ compId: sessionStorage.getItem('ws-pf_compId') })
+        .toPromise()
+        .then((response) => {
+          this.packtypeList = response
+        })
+    },
 
     submit() {
        if(!this.deptBudgetList.warehouseName){

+ 8 - 0
src/views/warehouse/warehouseManagementDelete.vue

@@ -165,6 +165,7 @@ export default {
     },
     //删除
     handleDelete(row) {
+      if(row.residual == 0){
     // console.log(row)
     this.$confirm(`此操作永久删除该仓库全部信息,是否确认删除`, {
       cancelButtonText: '取消',
@@ -189,6 +190,13 @@ export default {
       .catch(() => {
         return false
       })
+      }else{
+         this.$message({
+            message: '还有应余库存,不能删除此仓库!',
+            type: 'warning',
+          })
+          return
+      }
   },
     //隐藏
     handleHide(row) {

+ 13 - 7
src/views/warehouse/warehouseManagementIoss.vue

@@ -311,13 +311,7 @@ export default {
           }
           this.deptBudgetList.compId = this.compId
           this.deptBudgetList.contractType = 1
-          if (this.deptBudgetList.cumulativeStockOut < 0) {
-            this.$message({
-              message: '出库量为0,不能盘损!',
-              type: 'warning',
-            })
-            return
-          }
+         
           submitioss(this.deptBudgetList)
             .toPromise()
             .then((response) => {
@@ -395,6 +389,18 @@ 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(){},
     //删除

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

@@ -306,6 +306,7 @@ export default {
     },
     //待完成//传参
     nocomplete(row) {
+      if(row.number > 0){
       this.$router.push({
         path: 'warehouseManagementNoComplete',
         query: { baseId: row.warehouseId,
@@ -314,6 +315,7 @@ export default {
           binNumber : row.binNumber
         },
       })
+    }
     },
     //记录
     record(item) {