|
@@ -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 || "",
|