瀏覽代碼

Merge branch 'master' of git.echepei.com:zhujiawei/Warehouse_management_ui

wengyuwen 4 年之前
父節點
當前提交
1a7b3a37cb
共有 2 個文件被更改,包括 43 次插入45 次删除
  1. 27 31
      src/views/Warehousing/inStock/AddOrUpdate.vue
  2. 16 14
      src/views/Warehousing/inStock/index.vue

+ 27 - 31
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -850,7 +850,6 @@
               align="center"
               label="*库区"
             />
-
             <el-table-column
               prop="fCntrtype"
               header-align="center"
@@ -1949,20 +1948,21 @@
           </el-row>
           <el-row>
             <el-col :span="6">
-              <el-form-item label="库区" prop="fWarehouseInformation">
-                <el-select
-                  filterable
+              <el-form-item label="库区" prop="fWarehouselocid">
+                <!-- <el-cascader
                   v-model="importList.fWarehouseInformation"
-                  style="width: 100%"
+                  :props="cascaderprops"
+                  :options="fWarehouseidOptions"
+                  :show-all-levels="false"
+                ></el-cascader> -->
+                <treeselect
+                  v-model="importList.fWarehouselocid"
+                  @select="getAlltree"
+                  :options="fWarehouseidOptions"
+                  :show-count="true"
+                  :disable-branch-nodes="true"
                   placeholder="请选择库区"
-                >
-                  <el-option
-                    v-for="(item, index) in fWarehouseidOptions"
-                    :key="index.id"
-                    :label="item.label"
-                    :value="item.fWarehouseInformation"
-                  ></el-option>
-                </el-select>
+                />
               </el-form-item>
             </el-col>
             <el-col :span="6">
@@ -3029,6 +3029,7 @@ export default {
   },
   components: {
     UploadFile,
+    Treeselect,
   },
   data() {
     return {
@@ -3073,7 +3074,7 @@ export default {
         fGoodsid: [{ required: true, message: " ", trigger: "blur" }],
         fBusinessType: [{ required: true, message: " ", trigger: "blur" }],
         fMarks: [{ required: true, message: " ", trigger: "blur" }],
-        fWarehouseInformation: [
+        fWarehouselocid: [
           { required: true, message: " ", trigger: "blur" },
         ],
         fPackagespecs: [{ required: true, message: " ", trigger: "blur" }],
@@ -3139,7 +3140,6 @@ export default {
       dataListSelection: [],
       dataWithdrawList: [],
       title: "",
-      fWarehouselocid: null,
       fCNameOptions: [],
       fDNameOptions: [],
       whgenlegTotal: 0,
@@ -3333,7 +3333,7 @@ export default {
           arr = [...new Set(arr)];
           this.form.fMarks = arr.join(",");
         } else {
-           this.form.fMarks = "";
+          this.form.fMarks = "";
         }
         if (this.detailList.length == 0) {
           this.form.fNetweight = 0;
@@ -3425,7 +3425,7 @@ export default {
         arr = [...new Set(arr)];
         this.form.fMarks = arr.join(",");
       } else {
-         this.form.fMarks = "";
+        this.form.fMarks = "";
       }
       if (this.detailList.length == 0) {
         this.form.fNetweight = 0;
@@ -3516,7 +3516,7 @@ export default {
         arr = [...new Set(arr)];
         this.form.fMarks = arr.join(",");
       } else {
-         this.form.fMarks = "";
+        this.form.fMarks = "";
       }
       if (this.detailList.length == 0) {
         this.form.fNetweight = 0;
@@ -3636,6 +3636,10 @@ export default {
         }
       });
     },
+    //从表库位弹窗下拉树状事件
+    getAlltree(tree) {
+      this.importList.fWarehouseInformation = tree.fWarehouseInformation;
+    },
     submitForm() {
       this.$refs["form"].validate((valid) => {
         if (valid) {
@@ -3748,7 +3752,7 @@ export default {
             arr = [...new Set(arr)];
             this.form.fMarks = arr.join(",");
           } else {
-             this.form.fMarks = "";
+            this.form.fMarks = "";
           }
           let formData = new window.FormData();
           formData.append("tWarehouseBills", JSON.stringify(this.form));
@@ -3837,7 +3841,7 @@ export default {
             arr = [...new Set(arr)];
             this.form.fMarks = arr.join(",");
           } else {
-             this.form.fMarks = "";
+            this.form.fMarks = "";
           }
           formData.append("tWarehouseBills", JSON.stringify(this.form));
           // 库存明细
@@ -3925,14 +3929,6 @@ export default {
     imporTable() {
       this.$refs["importList"].validate((valid) => {
         if (valid) {
-          this.fWarehouselocid = null;
-          this.fWarehouseidOptions.map((e) => {
-            if (
-              e.fWarehouseInformation == this.importList.fWarehouseInformation
-            ) {
-              this.fWarehouselocid = e.id;
-            }
-          });
           this.detailList.push({
             fBillstatus: 10,
             fMblno: this.form.fMblno,
@@ -3943,7 +3939,7 @@ export default {
             fGoodsid: this.importList.fGoodsid,
             fBusinessType: this.importList.fBusinessType,
             fMarks: this.importList.fMarks,
-            fWarehouselocid: this.fWarehouselocid,
+            fWarehouselocid: this.importList.fWarehouselocid,
             fWarehouseInformation: this.importList.fWarehouseInformation,
             fCntrtype: this.importList.fCntrtype,
             fCntqty: this.importList.fCntqty,
@@ -3970,6 +3966,7 @@ export default {
     },
 
     fiximporTable() {
+      console.log(this.importList)
       this.detailList[this.fixdetaiNum] = this.importList;
       this.weightList = false;
     },
@@ -4308,7 +4305,6 @@ export default {
       this.reset();
       this.fixdetaiNum = null;
       this.fixdetaiNum = index;
-      console.log(row);
       row.fBsdate = new Date(row.fBsdate).getTime();
       row.fBusinessType = row.fBusinessType.toString();
       row.fCntrtype = Number(row.fCntrtype);
@@ -4614,7 +4610,7 @@ export default {
           arr = [...new Set(arr)];
           this.form.fMarks = arr.join(",");
         } else {
-           this.form.fMarks = "";
+          this.form.fMarks = "";
         }
         this.form.fBillingway = this.form.fFeetUnit;
         if (this.detailList.length == 0) {

+ 16 - 14
src/views/Warehousing/inStock/index.vue

@@ -497,6 +497,7 @@ import AddOrUpdate from "./AddOrUpdate.vue";
 import {
   listWarehousebills,
   delinStock_s,
+  delWarehousebills,
 } from "@/api/warehouseBusiness/warehouseInStock";
 import { listCorps } from "@/api/basicdata/corps";
 import { listWarehousesss } from "@/api/basicdata/warehouse";
@@ -865,18 +866,8 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$confirm('是否确认删除订单主编号为"' + ids + '"的数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      }).then(function () {
-        this.delFtmsorderbills(ids);
-      });
-    },
-    /** 删除按钮操作 */
-    delFtmsorderbills(ids) {
-      let tips = "";
+      const ids = row.fId || this.ids;
+      const tips = "";
       delinStock_s(ids).then((data) => {
         switch (data.msg) {
           case "0": {
@@ -885,12 +876,12 @@ export default {
           }
           case "1": {
             tips = "当前主表有数据从表无数据是否删除";
-            this.delete_S(fIds, tips);
+            this.delete(ids, tips);
             break;
           }
           case "2": {
             tips = "当前主表有数据从表有数据是否删除";
-            this.delete_S(fIds, tips);
+            this.delete(ids, tips);
             break;
           }
           default: {
@@ -899,6 +890,17 @@ export default {
         }
       });
     },
+    delete(ids, tips) {
+      this.$confirm(tips, "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(function () {
+        delWarehousebills(ids);
+        this.msgSuccess("删除成功");
+        this.getList();
+      });
+    },
     /** 导出按钮操作 */
     handleExport() {
       // require.ensure([], () => {