Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

csx 3 years ago
parent
commit
61f54bd72f

+ 13 - 17
src/xt_pages/stock/warehouseManage/components/AddWareHouse.vue View File

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

+ 8 - 11
src/xt_pages/stock/warehouseManage/query.vue View File

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

+ 4 - 5
src/xt_pages/stock/warehouseManage/waresetting.vue View File

11
           <div style="line-height: 36px; white-space: nowrap">
11
           <div style="line-height: 36px; white-space: nowrap">
12
             请选择耗材自动入库仓库:
12
             请选择耗材自动入库仓库:
13
           </div>
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
             <el-option
15
             <el-option
16
               v-for="item in options"
16
               v-for="item in options"
17
               :key="item.storehouse_name"
17
               :key="item.storehouse_name"
25
           <div style="line-height: 36px; white-space: nowrap">
25
           <div style="line-height: 36px; white-space: nowrap">
26
             请选择耗材自动出库仓库:
26
             请选择耗材自动出库仓库:
27
           </div>
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
             <el-option
29
             <el-option
30
               v-for="item in options"
30
               v-for="item in options"
31
               :key="item.storehouse_name"
31
               :key="item.storehouse_name"
39
           <div style="line-height: 36px; white-space: nowrap">
39
           <div style="line-height: 36px; white-space: nowrap">
40
             请选择药品自动入库仓库:
40
             请选择药品自动入库仓库:
41
           </div>
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
             <el-option
43
             <el-option
44
               v-for="item in options"
44
               v-for="item in options"
45
               :key="item.storehouse_name"
45
               :key="item.storehouse_name"
53
           <div style="line-height: 36px; white-space: nowrap">
53
           <div style="line-height: 36px; white-space: nowrap">
54
             请选择药品自动出库仓库:
54
             请选择药品自动出库仓库:
55
           </div>
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
             <el-option
57
             <el-option
58
               v-for="item in options"
58
               v-for="item in options"
59
               :key="item.storehouse_name"
59
               :key="item.storehouse_name"
109
       let param ={}
109
       let param ={}
110
       findstorehouseconfig(param).then((response) => {
110
       findstorehouseconfig(param).then((response) => {
111
         if (response.data.state == 1) {
111
         if (response.data.state == 1) {
112
-          console.log("response",response)
113
           this.h1 = response.data.data.storehouse_info;
112
           this.h1 = response.data.data.storehouse_info;
114
           this.h2 = response.data.data.storehouse_out_info;
113
           this.h2 = response.data.data.storehouse_out_info;
115
           this.h3 = response.data.data.drug_storehouse_info;
114
           this.h3 = response.data.data.drug_storehouse_info;