Browse Source

订单-备库管理

zhangjinxing 3 years ago
parent
commit
0d11ba8977

+ 8 - 3
src/views/purchaseIn/storeManage/columns.js

@@ -1,7 +1,8 @@
 export default [
      {
           prop: "bk_code",
-          label: "申请编号",
+          label: "申请编码",
+          width:"160"
         },
         {
           prop: "apply_name",
@@ -11,19 +12,22 @@ export default [
         {
           prop: "good_name",
           label: "商品名称",
+          'min-width':"120",
         },
         {
           prop: "good_type_code",
-          label: "商品属性",
+          label: "商品属性编码",
+          width:"140",
         },
         {
           prop: "good_num",
           label: "数量",
-          width: "50",
+          'min-width':"50"
         },
         {
           prop: "lasttime",
           label: "最晚入库时间",
+          width:"150",
         },
         {
           prop: "status",
@@ -35,6 +39,7 @@ export default [
           prop: "addtime",
           label: "创建时间",
           sortable: true,
+          width:"150",
         },
         {
           prop: "",

+ 21 - 1
src/views/purchaseIn/storeManage/components/addEdit.vue

@@ -200,8 +200,27 @@ export default {
   mounted() {
     this.routerId = this.$route.query.id;
     this.searchList();
+    this.initForm();
   },
   methods: {
+    async initForm() {
+      this.loading = true;
+      // await this.getRole();
+      if (this.id === "add") {
+        this.rulesThis = this.rules;
+        await this.resetForm();
+      } else {
+        if (this.isDetail) {
+          this.rulesThis = {};
+        } else {
+          this.rulesThis = this.rules;
+        }
+        console.log(this.id);
+        await this.resetForm();
+        // await this.initData();
+      }
+      this.loading = false;
+    },
     // 获取备库详情
     async searchList() {
       this.loading = true;
@@ -280,6 +299,7 @@ export default {
       console.log("closeModel!!");
       this.$emit("closeModel");
     },
+    // 重置
     async resetForm() {
       // 重置
       await this.$nextTick(() => {
@@ -334,7 +354,7 @@ export default {
               title,
               message: "",
             });
-
+            this.$emit("closeModel");
             this.routeGoto("storeManage", {});
           } else if (res && res.code >= 100 && res.code <= 104) {
             await this.logout();

+ 9 - 5
src/views/purchaseIn/storeManage/index.vue

@@ -37,22 +37,24 @@
                     @timeReturned="handleTime"
                   />
                 </el-col>
-                <!-- 商品编码 -->
+                <!-- 商品名称 -->
                 <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
                   <el-input
                     :size="searchSize"
                     placeholder="商品名称"
                     v-model="parmValue.good_name"
                     clearable
+                    @blur="searchList"
                   />
                 </el-col>
                 <!-- 备货申请编码 -->
-                <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
+                <el-col :span="4" style="width: 195px; padding: 0 0 0 10px">
                   <el-input
                     :size="searchSize"
                     v-model="parmValue.bk_code"
                     :maxlength="40"
                     placeholder="备货申请编码"
+                    @blur="searchList"
                   />
                 </el-col>
                 <el-col :span="4" style="width: 54px">
@@ -104,7 +106,6 @@
           </div>
         </template>
         <template #status="{ scope }">
-          <!--  :type="scope.row.status == '0' ? 'warning' : ''" -->
           <el-tag
             :size="tablebtnSize"
             :type="
@@ -218,7 +219,7 @@ export default {
   methods: {
     // 选择时间操作
     handleTime(e) {
-      console.log(e);
+      // console.log(e);
       if (e && e.startTime && e.endTime) {
         this.parmValue.start = e.startTime;
         this.parmValue.end = e.endTime;
@@ -228,6 +229,8 @@ export default {
       }
       if (this.parmValue.start != "" && this.parmValue.end != "") {
         this.searchList();
+      } else if (this.parmValue.start === "" && this.parmValue.end === "") {
+        this.searchList();
       }
     },
     // 点击详情操作
@@ -267,13 +270,14 @@ export default {
     // 列表搜索
     async searchList() {
       this.loading = true;
-      let { start, end, page, size, good_name } = this.parmValue;
+      let { start, end, page, size, good_name, bk_code } = this.parmValue;
       let model = {
         start,
         end,
         page,
         size,
         good_name,
+        bk_code,
       };
       const res = await asyncRequest.list(model);
       if (res && res.code === 0 && res.data) {