Преглед изворни кода

二级库-仓库管理bug修改

mainqaq пре 3 година
родитељ
комит
c898c45184

+ 13 - 17
src/xt_pages/stock/warehouseManage/components/AddWareHouse.vue Прегледај датотеку

@@ -24,9 +24,11 @@
24 24
           <el-input type="textarea" v-model="ruleForm.address" @input="aa"></el-input>
25 25
         </el-form-item>
26 26
         <el-form-item label="状态" prop="status">
27
-          <el-radio-group v-model="ruleForm.status" >
27
+          <el-radio-group v-model="ruleForm.status"  >
28 28
             <el-radio :label="1" >启用</el-radio>
29
-            <el-radio :label="0" >禁用</el-radio>
29
+            <el-radio :label="0">禁用</el-radio>
30
+<!--            <el-radio :label="1" @click.native="toDisable2">启用</el-radio>-->
31
+<!--            <el-radio :label="0" @click.native="toDisable">禁用</el-radio>-->
30 32
           </el-radio-group>
31 33
         </el-form-item>
32 34
         <el-form-item label="仓库管理员" prop="admin_id" >
@@ -49,7 +51,7 @@
49 51
 </template>
50 52
 
51 53
 <script>
52
-import { getcode,addstorehouse,updatestorehouse,getusername } from "@/api/warehouse";
54
+import { getcode,addstorehouse,updatestorehouse,getusername,updatestatus } from "@/api/warehouse";
53 55
 import login from '../../../../mock/login'
54 56
 export default {
55 57
   data() {
@@ -101,7 +103,6 @@ export default {
101 103
       console.log('op')
102 104
     },
103 105
     changeadmin(item) {
104
-      console.log("aaaaabbaaaaa",this.ruleForm.admin_id)
105 106
     },
106 107
     handleSelect() {
107 108
 
@@ -126,16 +127,15 @@ export default {
126 127
         this.dialogVisible = true;
127 128
         this.usernamelist()
128 129
       } else if (type == 2) {
129
-        console.log("data:::::::::::",data);
130 130
         this.show_type = 2;
131
-        this.storehouse_id = data.id;
131
+        this.storehouse_id = data.ID;
132 132
         this.title = "编辑仓库";
133
-        this.storehouse_code = data.storehouse_code;
134
-        this.ruleForm.address = data.storehouse_address;
135
-        this.ruleForm.status = data.storehouse_status;
136
-        this.ruleForm.storehouse_name = data.storehouse_name;
137
-        this.ruleForm.admin_name = data.storehouse_admin_name;
138
-        this.ruleForm.admin_id = data.storehouse_admin_id;
133
+        this.storehouse_code = data.StorehouseCode;
134
+        this.ruleForm.address = data.StorehouseAddress;
135
+        this.ruleForm.status = data.StorehouseStatus;
136
+        this.ruleForm.storehouse_name = data.StorehouseName;
137
+        this.ruleForm.admin_name = data.StorehouseAdminName;
138
+        this.ruleForm.admin_id = data.StorehouseAdminId;
139 139
         this.dialogVisible = true;
140 140
         this.usernamelist()
141 141
       }
@@ -151,7 +151,7 @@ export default {
151 151
     },
152 152
     //清除表单数据
153 153
     closePop() {
154
-      console.log("this.ruleForm",this.ruleForm)
154
+      // console.log("this.ruleForm",this.ruleForm)
155 155
       this.dialogVisible = false;
156 156
       this.ruleForm.admin_name = "";
157 157
       this.ruleForm.admin_id = "";
@@ -163,14 +163,11 @@ export default {
163 163
       this.ruleForm.address = "";
164 164
     },
165 165
 
166
-    //修改仓库状态
167
-
168 166
     //  验证表单内容
169 167
     submitForm(ruleForm) {
170 168
       if (this.show_type == 1) {
171 169
         this.$refs[ruleForm].validate((valid) => {
172 170
           if (valid) {
173
-            console.log("this.ruleForm.status",this.ruleForm.status);
174 171
             let params = {
175 172
               storehouse_code: this.storehouse_code || "",
176 173
               storehouse_name: this.ruleForm.storehouse_name || "",
@@ -197,7 +194,6 @@ export default {
197 194
       } else if (this.show_type == 2) {
198 195
         this.$refs[ruleForm].validate((valid) => {
199 196
           if (valid) {
200
-            console.log("this.ruleForm.status",this.ruleForm.status);
201 197
             let params = {
202 198
               storehouse_code: this.storehouse_code || "",
203 199
               storehouse_name: this.ruleForm.storehouse_name || "",

+ 8 - 11
src/xt_pages/stock/warehouseManage/query.vue Прегледај датотеку

@@ -47,28 +47,28 @@
47 47
       >
48 48
         <el-table-column label="仓库编号" align="center">
49 49
           <template slot-scope="scope">
50
-            <span>{{ scope.row.storehouse_code ? scope.row.storehouse_code : "" }}</span>
50
+            <span>{{ scope.row.StorehouseCode ? scope.row.StorehouseCode : "" }}</span>
51 51
           </template>
52 52
         </el-table-column>
53 53
         <el-table-column label="仓库名称" align="center">
54 54
           <template slot-scope="scope">
55
-            <span>{{ scope.row.storehouse_name ? scope.row.storehouse_name : "" }}</span>
55
+            <span>{{ scope.row.StorehouseName ? scope.row.StorehouseName : "" }}</span>
56 56
           </template>
57 57
         </el-table-column>
58 58
         <el-table-column label="仓库地址" align="center">
59 59
           <template slot-scope="scope">
60
-            <span>{{ scope.row.storehouse_address ? scope.row.storehouse_address : "" }}</span>
60
+            <span>{{ scope.row.StorehouseAddress ? scope.row.StorehouseAddress : "" }}</span>
61 61
           </template>
62 62
         </el-table-column>
63 63
         <el-table-column label="仓库管理员" align="center">
64 64
           <template slot-scope="scope">
65
-            <span>{{ scope.row.storehouse_admin_name ? scope.row.storehouse_admin_name : "" }}</span>
65
+            <span>{{ scope.row.StorehouseAdminName ? scope.row.StorehouseAdminName : "" }}</span>
66 66
           </template>
67 67
         </el-table-column>
68 68
         <el-table-column label="状态" align="center">
69 69
           <template slot-scope="scope">
70
-            <span v-if="scope.row.storehouse_status == 1">启用</span>
71
-            <span v-if="scope.row.storehouse_status == 0">禁用</span>
70
+            <span v-if="scope.row.StorehouseStatus == 1">启用</span>
71
+            <span v-if="scope.row.StorehouseStatus == 0">禁用</span>
72 72
           </template>
73 73
         </el-table-column>
74 74
 
@@ -186,7 +186,6 @@ export default {
186 186
         page: this.page,
187 187
         limit: this.limit,
188 188
       };
189
-      console.log("params", params);
190 189
       //请求分页接口
191 190
       storehouselist(params).then((response) => {
192 191
         if (response.data.state == 1) {
@@ -236,15 +235,13 @@ export default {
236 235
     // 编辑仓库
237 236
     toEdit(data,val) {
238 237
       this.$nextTick(() => {
239
-        console.log("aaaaaaaaa",data)
240
-        console.log("bbbbbbbbbb",val)
241 238
         this.$refs.AddWareHouse.show(data, val);
242 239
       })
243 240
     },
244 241
     // 禁用仓库
245 242
     toDisable(val, index) {
246 243
       var params = {
247
-        id:val.id,
244
+        id:val.ID,
248 245
       };
249 246
       this.$confirm("是否确定将此仓库禁用?", "禁用仓库信息", {
250 247
         confirmButtonText: "确 定",
@@ -269,7 +266,7 @@ export default {
269 266
     //删除仓库
270 267
     toDelete(val, index) {
271 268
       var params = {
272
-        id:val.id,
269
+        id:val.ID,
273 270
       };
274 271
       this.$confirm("是否确定将此仓库删除?", "删除仓库信息", {
275 272
         confirmButtonText: "确 定",

+ 4 - 5
src/xt_pages/stock/warehouseManage/waresetting.vue Прегледај датотеку

@@ -11,7 +11,7 @@
11 11
           <div style="line-height: 36px; white-space: nowrap">
12 12
             请选择耗材自动入库仓库:
13 13
           </div>
14
-          <el-select v-model="h1" placeholder="请选择" @select="handleSelect1" @change="updateconfig1(h1)" >
14
+          <el-select v-model="h1" filterable placeholder="请选择" @select="handleSelect1" @change="updateconfig1(h1)" >
15 15
             <el-option
16 16
               v-for="item in options"
17 17
               :key="item.storehouse_name"
@@ -25,7 +25,7 @@
25 25
           <div style="line-height: 36px; white-space: nowrap">
26 26
             请选择耗材自动出库仓库:
27 27
           </div>
28
-          <el-select v-model="h2" placeholder="请选择" @select="handleSelect2" @change="updateconfig2(h2)">
28
+          <el-select v-model="h2" filterable placeholder="请选择" @select="handleSelect2" @change="updateconfig2(h2)">
29 29
             <el-option
30 30
               v-for="item in options"
31 31
               :key="item.storehouse_name"
@@ -39,7 +39,7 @@
39 39
           <div style="line-height: 36px; white-space: nowrap">
40 40
             请选择药品自动入库仓库:
41 41
           </div>
42
-          <el-select v-model="h3" placeholder="请选择" @select="handleSelect3" @change="updateconfig3(h3)">
42
+          <el-select v-model="h3" filterable placeholder="请选择" @select="handleSelect3" @change="updateconfig3(h3)">
43 43
             <el-option
44 44
               v-for="item in options"
45 45
               :key="item.storehouse_name"
@@ -53,7 +53,7 @@
53 53
           <div style="line-height: 36px; white-space: nowrap">
54 54
             请选择药品自动出库仓库:
55 55
           </div>
56
-          <el-select v-model="h4" placeholder="请选择" @select="handleSelect4" @change="updateconfig4(h4)">
56
+          <el-select v-model="h4" filterable placeholder="请选择" @select="handleSelect4" @change="updateconfig4(h4)">
57 57
             <el-option
58 58
               v-for="item in options"
59 59
               :key="item.storehouse_name"
@@ -109,7 +109,6 @@ export default {
109 109
       let param ={}
110 110
       findstorehouseconfig(param).then((response) => {
111 111
         if (response.data.state == 1) {
112
-          console.log("response",response)
113 112
           this.h1 = response.data.data.storehouse_info;
114 113
           this.h2 = response.data.data.storehouse_out_info;
115 114
           this.h3 = response.data.data.drug_storehouse_info;