XMLWAN hace 4 años
padre
commit
89c1d67efd

+ 5 - 4
src/api/device/device.js Ver fichero

@@ -120,13 +120,14 @@ export function getDeviceNumbers() {
120 120
     })
121 121
 }
122 122
 
123
-export function createDeviceNumber(number, zone_id, group_id) {
123
+export function createDeviceNumber(number, zone_id, group_id,sort) {
124 124
     const params = {
125 125
         number: number,
126 126
         zone: zone_id,
127 127
         group: group_id,
128
-       
128
+        sort:sort,
129 129
     }
130
+   
130 131
     return request({
131 132
         url: '/api/device/number/create',
132 133
         method: 'post',
@@ -134,13 +135,13 @@ export function createDeviceNumber(number, zone_id, group_id) {
134 135
     })
135 136
 }
136 137
 
137
-export function modifyDeviceNumber(id, number, zone_id, group_id) {
138
+export function modifyDeviceNumber(id, number, zone_id, group_id,sort) {
138 139
     const params = {
139 140
         id: id,
140 141
         number: number,
141 142
         zone: zone_id,
142 143
         group: group_id,
143
-      
144
+        sort:sort
144 145
     }
145 146
     return request({
146 147
         url: '/api/device/number/modify',

+ 15 - 14
src/xt_pages/device/number_main.vue Ver fichero

@@ -36,11 +36,11 @@
36 36
               label="所属分组"
37 37
               align="center"
38 38
             ></el-table-column>
39
-            <!-- <el-table-column prop="sort" label="排序" align="center">
39
+            <el-table-column prop="sort" label="排序" align="center">
40 40
                 <template slot-scope="scope">
41 41
                     {{scope.row.sort?scope.row.sort:""}}
42 42
                 </template>
43
-            </el-table-column> -->
43
+            </el-table-column>
44 44
             <el-table-column label="操作" align="center">
45 45
               <template slot-scope="scope">
46 46
                 <el-tooltip
@@ -138,9 +138,9 @@
138 138
               ></el-option>
139 139
             </el-select>
140 140
           </el-form-item>
141
-          <!-- <el-form-item label="排序:">
141
+          <el-form-item label="排序:">
142 142
               <el-input style="width:220px" v-model="number_form.sort"></el-input>
143
-          </el-form-item> -->
143
+          </el-form-item>
144 144
           <!-- <el-form-item>
145 145
                     <el-button @click="cancelModifyDeviceNumber">取 消</el-button>
146 146
                     <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary" @click="editDeviceNumberSubmitAction">保存</el-button>
@@ -185,7 +185,7 @@ export default {
185 185
         number: "",
186 186
         zone: "",
187 187
         group: "",
188
-        // sort:0,
188
+        sort:"",
189 189
       },
190 190
       formLabelWidth: "110px",
191 191
       showEditDeviceNumber: false,
@@ -221,12 +221,12 @@ export default {
221 221
       this.number_form.number = row.number;
222 222
       this.number_form.zone = row.zone_id;
223 223
       this.number_form.group = row.group_id;
224
-      // if(row.sort == 0){
225
-      //   this.number_form.sort = ""
226
-      // }
227
-      // if(row.sort != 0){
228
-      //   this.number_form.sort = row.sort
229
-      // }
224
+      if(row.sort == 0){
225
+        this.number_form.sort = ""
226
+      }
227
+      if(row.sort != 0){
228
+        this.number_form.sort = row.sort
229
+      }
230 230
      
231 231
       this.showEditDeviceNumber = true;
232 232
     },
@@ -235,6 +235,7 @@ export default {
235 235
       this.number_form.number = "";
236 236
       this.number_form.zone = "";
237 237
       this.number_form.group = "";
238
+      this.number_form.sort = ""
238 239
       this.$refs.form_number.clearValidate();
239 240
       this.showEditDeviceNumber = false;
240 241
     },
@@ -246,7 +247,7 @@ export default {
246 247
               this.number_form.number,
247 248
               this.number_form.zone,
248 249
               this.number_form.group,
249
-              // this.number_form.sort
250
+              this.number_form.sort
250 251
             ).then(rs => {
251 252
               var resp = rs.data;
252 253
               if (resp.state === 1) {
@@ -263,7 +264,7 @@ export default {
263 264
               this.number_form.number,
264 265
               this.number_form.zone,
265 266
               this.number_form.group,
266
-              // this.number_form.sort
267
+              this.number_form.sort
267 268
             ).then(rs => {
268 269
               var resp = rs.data;
269 270
               // console.log(resp.data)
@@ -280,7 +281,7 @@ export default {
280 281
                     number.group_id = resp.data.number.group_id;
281 282
                     number.zone_name = resp.data.number.zone_name;
282 283
                     number.group_name = resp.data.number.group_name;
283
-
284
+                    number.sort = resp.data.number.sort;
284 285
                     break;
285 286
                   }
286 287
                 }

+ 8 - 8
src/xt_pages/dialysis/PatientBox.vue Ver fichero

@@ -3,7 +3,7 @@
3 3
     <!-- <router-link to="/dialysis/details"> -->
4 4
     <div
5 5
       class="patient"
6
-      v-for="schedule in schedules"
6
+      v-for="schedule in scheduleArr"
7 7
       v-if="schedule.patient"
8 8
       :class="borderColor(schedule)"
9 9
       @click.stop="detailAction(schedule)"
@@ -647,14 +647,14 @@ export default {
647 647
   created(){
648 648
     console.log("排班数据33333",this.schedules)
649 649
 
650
-  //   for(let i=0;i<this.schedules.length;i++){
651
-  //      this.schedules[i].Sort = this.schedules[i].device_number.sort
652
-  //   }
650
+    for(let i=0;i<this.schedules.length;i++){
651
+       this.schedules[i].Sort = this.schedules[i].device_number.sort
652
+    }
653 653
 
654
-  //  console.log("9999999",this.schedules)
655
-  //  this.schedules.sort(this.compare("Sort"))
656
-  //   console.log("122212121212112",this.schedules)
657
-  //   this.scheduleArr = this.schedules
654
+   console.log("9999999",this.schedules)
655
+   this.schedules.sort(this.compare("Sort"))
656
+    console.log("122212121212112",this.schedules)
657
+    this.scheduleArr = this.schedules
658 658
   }
659 659
 };
660 660
 </script>

+ 12 - 9
src/xt_pages/stock/Dialog/goodTypeDialog.vue Ver fichero

@@ -9,20 +9,20 @@
9 9
           </el-form-item>
10 10
         </el-col>
11 11
       </el-row>
12
-      <!-- <el-row>
12
+      <el-row>
13 13
         <el-col>
14 14
           <el-form-item label="耗材属性">
15
-              <el-radio v-model="stock_attribute" label="1">无</el-radio>
16
-              <el-radio v-model="stock_attribute" label="2">透析器</el-radio>
17
-              <el-radio v-model="stock_attribute" label="3">灌流器</el-radio>
15
+              <el-radio v-model="formValue.stock_attribute" label="1">无</el-radio>
16
+              <el-radio v-model="formValue.stock_attribute" label="2">透析器</el-radio>
17
+              <el-radio v-model="formValue.stock_attribute" label="3">灌流器</el-radio>
18 18
           </el-form-item>
19 19
         </el-col>
20
-      </el-row> -->
20
+      </el-row>
21 21
       <el-row>
22 22
         <el-col>
23 23
           <el-form-item label="耗材出库" prop="out_stock">
24
-             <el-radio v-model="out_stock" label="1">是</el-radio>
25
-             <el-radio v-model="out_stock" label="2">否</el-radio>
24
+             <el-radio v-model="formValue.out_stock" label="1">是</el-radio>
25
+             <el-radio v-model="formValue.out_stock" label="2">否</el-radio>
26 26
           </el-form-item>     
27 27
         </el-col>
28 28
       </el-row>
@@ -67,7 +67,7 @@ export default {
67 67
         ]
68 68
       },
69 69
        out_stock: '1',
70
-       stock_attribute:'1'
70
+       stock_attribute:"1"
71 71
     };
72 72
   },
73 73
   props: {
@@ -106,7 +106,8 @@ export default {
106 106
       form["type_name"] = this.formValue.type_name;
107 107
       form["remark"] = this.formValue.remark;
108 108
       form["isCreated"] = this.isCreated;
109
-      form['out_stock'] = this.out_stock;
109
+      form['out_stock'] = this.formValue.out_stock;
110
+      form["stock_attribute"] = this.formValue.stock_attribute
110 111
       return form;
111 112
     }
112 113
   },
@@ -117,6 +118,8 @@ export default {
117 118
           this.$refs["formValue"].resetFields();
118 119
           this.formValue.remark = "";
119 120
           this.formValue.type_name = "";
121
+          this.formValue.stock_attribute="1";
122
+          this.formValue.out_stock = "1"
120 123
         }, 0);
121 124
     }
122 125
   }

+ 11 - 5
src/xt_pages/stock/config/goodType.vue Ver fichero

@@ -228,7 +228,9 @@ export default {
228 228
           isCreated: 1, //1.创建 2.编辑 3.查看详情
229 229
           formValue: {
230 230
             type_name: "",
231
-            remark: ""
231
+            remark: "",
232
+            stock_attribute:"1",
233
+            out_stock:"1",
232 234
           },
233 235
           isVisibility: false
234 236
         }
@@ -251,13 +253,15 @@ export default {
251 253
           this.$message.error(response.data.msg);
252 254
           return false;
253 255
         } else {
254
-          this.goodType.goodTypeDialog.formValue.remark =
255
-            response.data.data.goodType.remark;
256
-          this.goodType.goodTypeDialog.formValue.type_name =
257
-            response.data.data.goodType.type_name;
256
+          console.log("response.data.data",response.data.data.goodType)
257
+          this.goodType.goodTypeDialog.formValue.remark = response.data.data.goodType.remark;
258
+          this.goodType.goodTypeDialog.formValue.type_name =response.data.data.goodType.type_name;
259
+          this.goodType.goodTypeDialog.formValue.stock_attribute = response.data.data.goodType.stock_attribute.toString()
260
+          this.goodType.goodTypeDialog.formValue.out_stock = response.data.data.goodType.out_stock.toString()
258 261
           this.goodType.goodTypeDialog.isCreated = 2;
259 262
           this.$refs.dialog.show();
260 263
           this.goodType.type_code = response.data.data.goodType.type_code;
264
+
261 265
         }
262 266
       });
263 267
     },
@@ -315,6 +319,7 @@ export default {
315 319
           type_code: this.goodType.type_code,
316 320
           id: this.goodType.editTypeId,
317 321
           out_stock:val.out_stock,
322
+          stock_attribute:val.stock_attribute,
318 323
         };
319 324
       
320 325
         modifyGoodType(params).then(response => {
@@ -334,6 +339,7 @@ export default {
334 339
         });
335 340
       } else if (val.isCreated == 1) {
336 341
         //新增
342
+        console.log("val22222",val)
337 343
        
338 344
         createGoodType(val).then(response => {
339 345