소스 검색

页面调整

huangyw 3 년 전
부모
커밋
2c924d71d3
1개의 변경된 파일248개의 추가작업 그리고 141개의 파일을 삭제
  1. 248 141
      src/xt_pages/supply/components/editPurchaseOrder.vue

+ 248 - 141
src/xt_pages/supply/components/editPurchaseOrder.vue 파일 보기

@@ -20,15 +20,18 @@
20 20
             placeholder="请选择"
21 21
             @change="changeTypeName"
22 22
           >
23
+                       
23 24
             <el-option
24 25
               v-for="item in supplyList"
25 26
               :key="item.id"
26 27
               :label="item.supplier_name"
27 28
               :value="item.id"
28 29
             >
30
+                         
29 31
             </el-option>
32
+                     
30 33
           </el-select>
31
-          <span>单据日期:</span>
34
+                    <span>单据日期:</span>
32 35
           <el-date-picker
33 36
             size="small"
34 37
             v-model="start_time"
@@ -42,7 +45,7 @@
42 45
             value-format="yyyy-MM-dd"
43 46
             @change="startTimeChange"
44 47
           ></el-date-picker>
45
-          <span>交货日期:</span>
48
+                    <span>交货日期:</span>          
46 49
           <el-date-picker
47 50
             size="small"
48 51
             v-model="end_time"
@@ -56,18 +59,22 @@
56 59
             value-format="yyyy-MM-dd"
57 60
             @change="endTimeChange"
58 61
           ></el-date-picker>
59
-          <span>单据编码:{{ number }}</span>
62
+                    <span>单据编码:{{ number }}</span>
60 63
         </div>
61 64
         <div>
65
+                   
62 66
           <el-button size="small" type="primary" @click="toAdd" v-show="showOne"
63 67
             >生成购货单</el-button
64 68
           >
69
+                   
65 70
           <el-button size="small" type="primary" @click="updatePurchaseOrder"
66 71
             >修改</el-button
67 72
           >
73
+                   
68 74
           <el-button size="small" type="primary" @click="toPrint"
69 75
             >打印</el-button
70 76
           >
77
+                   
71 78
           <el-button
72 79
             size="small"
73 80
             type="primary"
@@ -76,6 +83,7 @@
76 83
             v-show="showTwo"
77 84
             >审核</el-button
78 85
           >
86
+                   
79 87
           <el-button
80 88
             size="small"
81 89
             type="primary"
@@ -84,10 +92,11 @@
84 92
             v-show="showThree"
85 93
             >反审核</el-button
86 94
           >
95
+                 
87 96
         </div>
88 97
       </div>
89
-
90 98
       <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
99
+           
91 100
         <el-table
92 101
           :row-style="{ color: '#303133' }"
93 102
           :header-cell-style="{
@@ -101,14 +110,19 @@
101 110
           max-height="450"
102 111
         >
103 112
           <el-table-column align="center" width="200px">
113
+                       
104 114
             <template slot="header" slot-scope="scope">
105
-              <span>商品<span style="color: red">*</span></span>
115
+                            <span>商品<span style="color: red">*</span></span>  
116
+                       
106 117
             </template>
118
+                       
107 119
             <template slot-scope="scope">
120
+                           
108 121
               <el-form-item
109 122
                 :prop="'tableList.' + scope.$index + '.name'"
110 123
                 :rules="tableRules.name"
111 124
               >
125
+                               
112 126
                 <el-select
113 127
                   v-model="scope.row.name"
114 128
                   style="width: 160px"
@@ -118,47 +132,70 @@
118 132
                   @input="changeGoodName(scope.$index)"
119 133
                   :disabled="disabled"
120 134
                 >
135
+                                   
121 136
                   <el-option
122 137
                     v-for="(item, index) in tabList"
123 138
                     :key="index"
124 139
                     :label="item.supply_name"
125 140
                     :value="item"
126 141
                   >
142
+                                     
127 143
                   </el-option>
144
+                                 
128 145
                 </el-select>
146
+                             
129 147
               </el-form-item>
148
+                         
130 149
             </template>
150
+                     
131 151
           </el-table-column>
152
+           
132 153
           <el-table-column align="center" width="150px">
154
+                       
133 155
             <template slot="header" slot-scope="scope">
134
-              <span>商品类别</span>
156
+                            <span>商品类别</span>            
135 157
             </template>
158
+                       
136 159
             <template slot-scope="scope">
160
+                           
137 161
               <el-input
138 162
                 v-model="scope.row.supply_type"
139 163
                 style="width: 120px"
140 164
                 :disabled="true"
141 165
               ></el-input>
166
+                         
142 167
             </template>
168
+                     
143 169
           </el-table-column>
170
+
144 171
           <el-table-column label="规格&单位" align="center" width="200px">
172
+                       
145 173
             <template slot-scope="scope">
174
+                           
146 175
               <el-input
147 176
                 v-model="scope.row.supply_specification_name"
148 177
                 style="width: 150px"
149 178
                 :disabled="true"
150 179
               ></el-input>
180
+                         
151 181
             </template>
182
+                     
152 183
           </el-table-column>
184
+                   
153 185
           <el-table-column label="单位" align="center" width="120px">
186
+                       
154 187
             <template slot="header" slot-scope="scope">
155
-              <span>单位<span style="color: red">*</span></span>
188
+                            <span>单位<span style="color: red">*</span></span>  
189
+                       
156 190
             </template>
191
+                       
157 192
             <template slot-scope="scope">
193
+                           
158 194
               <el-form-item
159 195
                 :prop="'tableList.' + scope.$index + '.supply_unit'"
160 196
                 :rules="tableRules.supply_unit"
161 197
               >
198
+                               
162 199
                 <el-select
163 200
                   v-model="scope.row.supply_unit"
164 201
                   style="width: 100px"
@@ -166,63 +203,93 @@
166 203
                   placeholder="请选择"
167 204
                   :disabled="disabled"
168 205
                 >
206
+                                   
169 207
                   <el-option
170 208
                     v-for="(item, index) in scope.row.unitList"
171 209
                     :key="index"
172 210
                     :label="item.name"
173 211
                     :value="item.name"
174 212
                   >
213
+                                     
175 214
                   </el-option>
215
+                                 
176 216
                 </el-select>
217
+                             
177 218
               </el-form-item>
219
+                         
178 220
             </template>
221
+                     
179 222
           </el-table-column>
180
-
181 223
           <el-table-column label="可用库存" align="center" width="130px">
224
+                       
182 225
             <template slot-scope="scope">
226
+                           
183 227
               <el-input
184 228
                 v-model="scope.row.supply_total"
185 229
                 style="width: 100px"
186 230
                 :disabled="true"
187 231
               ></el-input>
232
+                         
188 233
             </template>
234
+                     
189 235
           </el-table-column>
236
+                   
190 237
           <el-table-column label="数量" align="center" width="120px">
238
+                       
191 239
             <template slot="header" slot-scope="scope">
192
-              <span>数量<span style="color: red">*</span></span>
240
+                            <span>数量<span style="color: red">*</span></span>  
241
+                       
193 242
             </template>
243
+                       
194 244
             <template slot-scope="scope">
245
+                           
195 246
               <el-form-item
196 247
                 :prop="'tableList.' + scope.$index + '.supply_count'"
197 248
                 :rules="tableRules.supply_count"
198 249
               >
250
+                               
199 251
                 <el-input
200 252
                   v-model="scope.row.supply_count"
201 253
                   style="width: 80px"
202 254
                   :disabled="disabled"
203 255
                 ></el-input>
256
+                             
204 257
               </el-form-item>
258
+                         
205 259
             </template>
260
+                     
206 261
           </el-table-column>
207 262
 
263
+                   
208 264
           <el-table-column label="购货单价" align="center" width="120px">
265
+                       
209 266
             <template slot-scope="scope">
267
+                           
210 268
               <el-input
211 269
                 v-model="scope.row.supply_price"
212 270
                 style="width: 80px"
213 271
                 :disabled="disabled"
214 272
               ></el-input>
273
+                         
215 274
             </template>
275
+                     
216 276
           </el-table-column>
217 277
 
218
-          <el-table-column label="购货金额" align="center" width="120px">
278
+             <el-table-column label="购货金额" align="center" width="120px">
279
+                       
219 280
             <template slot-scope="scope">
220
-              {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
281
+                           
282
+              {{ calculate(scope.row.supply_count * scope.row.supply_price) }}  
283
+                       
221 284
             </template>
285
+                     
222 286
           </el-table-column>
223 287
 
288
+                   
224 289
           <el-table-column label="生产厂家" align="center" width="200px">
290
+                       
225 291
             <template slot-scope="scope">
292
+                           
226 293
               <el-select
227 294
                 size="small"
228 295
                 v-model="scope.row.supply_manufacturer"
@@ -230,157 +297,229 @@
230 297
                 placeholder="请选择厂商"
231 298
                 :disabled="disabled"
232 299
               >
300
+                               
233 301
                 <el-option
234 302
                   v-for="(option, index) in manufactuerList"
235 303
                   :key="index"
236 304
                   :label="option.manufacturer_name"
237 305
                   :value="option.id"
238 306
                 >
307
+                                 
239 308
                 </el-option>
240
-          </el-select>
241
-        </template>
242
-    </el-table-column>
243
-
244
-
245
-    <el-table-column label="批准文号" align="center" width="200px">
246
-        <template slot-scope="scope">
247
-        <el-input v-model="scope.row.supply_license_number" style="width:160px" :disabled="true"></el-input>
248
-        </template>
249
-    </el-table-column>
250
- 
251
-    <el-table-column label="备注" align="center" width="200px">
252
-        <template slot-scope="scope">
253
-        <el-input v-model="scope.row.supply_remake" style="width:160px" :disabled="disabled"></el-input>
254
-        </template>
255
-    </el-table-column>
309
+                         
310
+              </el-select>
311
+                     
312
+            </template>
313
+               
314
+          </el-table-column>
256 315
 
257
-    <el-table-column label="操作" align="center" width="150px" fixed="right" >
258
-        <template slot-scope="scope">
259
-        <el-tooltip class="item" effect="dark" content="新增" placement="top" >
260
-            <el-button
261
-                size="mini"
262
-                type="primary"
263
-                icon="el-icon-circle-plus-outline"
264
-                @click="handleEdit(scope.$index, scope.row)">
265
-            </el-button>
266
-       </el-tooltip>
267
-       <el-tooltip class="item" effect="dark" content="删除" placement="top">
268
-            <el-button
269
-                size="mini"
270
-                type="danger"
271
-                icon="el-icon-delete"
272
-                @click="handleDelete(scope.$index, scope.row)">
273
-            </el-button>
274
-        </el-tooltip>
316
+             
317
+          <el-table-column label="批准文号" align="center" width="200px">
318
+                   
319
+            <template slot-scope="scope">
320
+                     
321
+              <el-input
322
+                v-model="scope.row.supply_license_number"
323
+                style="width: 160px"
324
+                :disabled="true"
325
+              ></el-input>
326
+                     
327
+            </template>
328
+               
329
+          </el-table-column>
330
+               
331
+          <el-table-column label="备注" align="center" width="200px">
332
+                   
333
+            <template slot-scope="scope">
334
+                     
335
+              <el-input
336
+                v-model="scope.row.supply_remake"
337
+                style="width: 160px"
338
+                :disabled="disabled"
339
+              ></el-input>
340
+                     
341
+            </template>
342
+               
343
+          </el-table-column>
275 344
 
276
-        </template>
277
-    </el-table-column>
278
-  </el-table>
345
+          <el-table-column
346
+            label="操作"
347
+            align="center"
348
+            width="150px"
349
+            fixed="right"
350
+          >
351
+                   
352
+            <template slot-scope="scope">
353
+                     
354
+              <el-tooltip
355
+                class="item"
356
+                effect="dark"
357
+                content="新增"
358
+                placement="top"
359
+              >
360
+                           
361
+                <el-button
362
+                  size="mini"
363
+                  type="primary"
364
+                  icon="el-icon-circle-plus-outline"
365
+                  @click="handleEdit(scope.$index, scope.row)"
366
+                >
367
+                             
368
+                </el-button>
369
+                       </el-tooltip
370
+              >
371
+                     <el-tooltip
372
+                class="item"
373
+                effect="dark"
374
+                content="删除"
375
+                placement="top"
376
+              >
377
+                           
378
+                <el-button
379
+                  size="mini"
380
+                  type="danger"
381
+                  icon="el-icon-delete"
382
+                  @click="handleDelete(scope.$index, scope.row)"
383
+                >
384
+                             
385
+                </el-button>
386
+                       
387
+              </el-tooltip>
279 388
 
280
-   <!-- 审核水印 -->
281
-  <img src="@/assets/purchase/Reviewed.png" alt="正在加载..." class="reviewImg" v-show="Reviewed == true" />
282
-</el-form>
283
-   <div style="margin-top:10px">
284
-      合计:{{getAllPrice()}} 元
285
-   </div>
286
-   <div style="margin-top:10px">
287
-        <span>优惠率:<el-input style="width:100px" v-model="rate_of_concession" @input='addressChange' :disabled="disabled"></el-input>%</span>
389
+                     
390
+            </template>
391
+               
392
+          </el-table-column>
393
+        </el-table>
394
+        <!-- 审核水印 -->
395
+         
396
+        <img
397
+          src="@/assets/purchase/Reviewed.png"
398
+          alt="正在加载..."
399
+          class="reviewImg"
400
+          v-show="Reviewed == true"
401
+        />
402
+      </el-form>
403
+      <el-form>
404
+         
405
+        <div style="margin-top: 10px">
406
+                合计:{{ getAllPrice() }} 元    
407
+        </div>
408
+         
409
+        <div style="margin-top: 10px">
410
+                 
411
+          <span
412
+            >优惠率:<el-input
413
+              style="width: 100px"
414
+              v-model="rate_of_concession"
415
+              @input="addressChange"
416
+              :disabled="disabled"
417
+            ></el-input
418
+            >%</span
419
+          >
288 420
 
289
-        <span>优惠金额:<el-input style="width:100px" v-model="discount_amount" :disabled="disabled"></el-input></span>
421
+                 
422
+          <span
423
+            >优惠金额:<el-input
424
+              style="width: 100px"
425
+              v-model="discount_amount"
426
+              :disabled="disabled"
427
+            ></el-input
428
+          ></span>
429
+           
430
+        </div>
431
+      </el-form>
290 432
 
433
+      <el-form>
434
+        <el-table>
435
+                   
291 436
           <el-table-column label="批准文号" align="center" width="200px">
437
+                       
292 438
             <template slot-scope="scope">
439
+                           
293 440
               <el-input
294 441
                 v-model="scope.row.supply_license_number"
295 442
                 style="width: 160px"
296 443
                 :disabled="disabled"
297 444
               ></el-input>
445
+                         
298 446
             </template>
447
+                     
299 448
           </el-table-column>
300 449
 
450
+                   
301 451
           <el-table-column label="备注" align="center" width="200px">
452
+                       
302 453
             <template slot-scope="scope">
454
+                           
303 455
               <el-input
304 456
                 v-model="scope.row.supply_remake"
305 457
                 style="width: 160px"
306 458
                 :disabled="disabled"
307 459
               ></el-input>
460
+                         
308 461
             </template>
462
+                     
309 463
           </el-table-column>
310 464
 
465
+                   
311 466
           <el-table-column
312 467
             label="操作"
313 468
             align="center"
314 469
             width="150px"
315 470
             fixed="right"
316 471
           >
472
+                       
317 473
             <template slot-scope="scope">
474
+                           
318 475
               <el-tooltip
319 476
                 class="item"
320 477
                 effect="dark"
321 478
                 content="新增"
322 479
                 placement="top"
323 480
               >
481
+                               
324 482
                 <el-button
325 483
                   size="mini"
326 484
                   type="primary"
327 485
                   icon="el-icon-circle-plus-outline"
328 486
                   @click="handleEdit(scope.$index, scope.row)"
329 487
                 >
488
+                                 
330 489
                 </el-button>
490
+                             
331 491
               </el-tooltip>
492
+                           
332 493
               <el-tooltip
333 494
                 class="item"
334 495
                 effect="dark"
335 496
                 content="删除"
336 497
                 placement="top"
337 498
               >
499
+                               
338 500
                 <el-button
339 501
                   size="mini"
340 502
                   type="danger"
341 503
                   icon="el-icon-delete"
342 504
                   @click="handleDelete(scope.$index, scope.row)"
343 505
                 >
506
+                                 
344 507
                 </el-button>
508
+                             
345 509
               </el-tooltip>
510
+                         
346 511
             </template>
512
+                     
347 513
           </el-table-column>
514
+                 
348 515
         </el-table>
349 516
       </el-form>
350
-      <!-- <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
351
-      <div style="margin-top: 10px">
352
-        <span
353
-          >优惠率:<el-input
354
-            style="width: 100px"
355
-            v-model="rate_of_concession"
356
-            @input="addressChange"
357
-          ></el-input
358
-          >%</span
359
-        >
360
-
361
-        <span
362
-          >优惠金额:<el-input
363
-            style="width: 100px"
364
-            v-model="discount_amount"
365
-          ></el-input
366
-        ></span>
367
-      </div> -->
368
-
369
-      <Computed :total="total_price" :rate_of_concession="rate_of_concession" :discount_amount="discount_amount"></Computed>
370 517
     </div>
371
-
372
-    <!-- <el-dialog title="系统提示" :visible.sync="dialogVisible" width="30%">
373
-      <span>
374
-        购货订单{{ number }}已有以下关联数据,不能反审核
375
-        <div v-for="(item, index) in orderList" :key="index">
376
-          <li>购货单{{ item.good_number }}</li>
377
-          <a @click="toClick(item.id)">点击查看</a>
378
-        </div>
379
-      </span>
380
-      <span slot="footer" class="dialog-footer">
381
-        <el-button @click="dialogVisible = false">取 消</el-button>
382
-      </span>
383
-    </el-dialog> -->
518
+    <Computed
519
+      :total="total_price"
520
+      :rate_of_concession="rate_of_concession"
521
+      :discount_amount="discount_amount"
522
+    ></Computed>
384 523
   </div>
385 524
 </template>
386 525
 
@@ -880,8 +1019,7 @@ export default {
880 1019
       if (this.is_check == 2) {
881 1020
         this.$message.error("该采购订单未审核,不能生成采购数据!");
882 1021
         return false;
883
-      }
884
-      //获取商品购货订单 和 购货单的总数量
1022
+      } //获取商品购货订单 和 购货单的总数量
885 1023
       getAllOrderCountList(id).then((response) => {
886 1024
         if (response.data.state == 1) {
887 1025
           var purcaseOrder = response.data.data.purcaseOrder;
@@ -891,8 +1029,7 @@ export default {
891 1029
           console.log("采购单", goodOrder);
892 1030
           var drugList = response.data.data.drugList;
893 1031
           console.log("druglist23323223", drugList);
894
-          var ids = "";
895
-          // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
1032
+          var ids = ""; // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
896 1033
           if (goodOrder.length == 0) {
897 1034
             this.$router.push({
898 1035
               path: "/good/order/add?id=" + id + "&ids=" + ids,
@@ -951,9 +1088,8 @@ export default {
951 1088
 
952 1089
             var arr = [];
953 1090
             var total = 0;
954
-            var str = "";
1091
+            var str = ""; //如果采购单有数据,则需要比较数量
955 1092
 
956
-            //如果采购单有数据,则需要比较数量
957 1093
             if (newArr.length > 0) {
958 1094
               for (let i = 0; i < purcaseOrder.length; i++) {
959 1095
                 for (let j = 0; j < newArr.length; j++) {
@@ -964,9 +1100,7 @@ export default {
964 1100
                     }
965 1101
                   }
966 1102
                 }
967
-              }
968
-              //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
969
-
1103
+              } //如果total的长度等于 采购单的长度,怎表示该采购订单已经全部生成
970 1104
               if (arr.length == 0) {
971 1105
                 this.$message.error("该订单已全部生成采购单,请知悉!");
972 1106
                 return;
@@ -992,13 +1126,11 @@ export default {
992 1126
       }
993 1127
     },
994 1128
     checkReturnOrder() {
995
-      var id = this.$route.query.id;
996
-      //获取购货订单号
1129
+      var id = this.$route.query.id; //获取购货订单号
997 1130
       getGoodOrderList(id).then((response) => {
998 1131
         if (response.data.state == 1) {
999 1132
           var list = response.data.data.list;
1000
-          this.orderList = list;
1001
-          //如果长度大于0,有购货单不能反审核
1133
+          this.orderList = list; //如果长度大于0,有购货单不能反审核
1002 1134
           if (list.length > 0) {
1003 1135
             // this.dialogVisible = false;
1004 1136
             this.$popup({
@@ -1060,66 +1192,41 @@ export default {
1060 1192
   },
1061 1193
 };
1062 1194
 </script>
1063
-
1064 1195
 <style rel="stylesheet/css" lang="scss" scoped>
1065
-.information {
1066
-  border: 1px #dcdfe6 solid;
1067
-  padding: 30px 20px 30px 20px;
1068
-
1069
-  .border {
1070
-    border-bottom: 1px #dcdfe6 solid;
1071
-    margin: 0px 0 20px 0;
1072
-  }
1073
-}
1074
-
1075
-.title {
1076
-  background: #409eff;
1077
-  height: 44px;
1078
-  line-height: 44px;
1079
-  padding: 0 0 0 10px;
1080
-  color: #fff;
1081
-  margin: 0 0 10px 0;
1082
-}
1083
-
1084
-.edit_separater {
1085
-  border-top: 1px solid rgb(233, 233, 233);
1086
-  margin-top: 15px;
1087
-  margin-bottom: 15px;
1088
-}
1089 1196
 </style>
1090
-
1091 1197
 <style>
1092 1198
 .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
1093
-  font-size: 12px;
1199
+  font-size: 12px;
1094 1200
 }
1095 1201
 
1096 1202
 .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
1097
-  background: #6fb5fa;
1203
+  background: #6fb5fa;
1098 1204
 }
1099 1205
 
1100 1206
 .count {
1101
-  color: #bd2c00;
1207
+  color: #bd2c00;
1102 1208
 }
1103 1209
 .el-table td,
1104 1210
 .el-table th.is-leaf,
1105 1211
 .el-table--border,
1106 1212
 .el-table--group {
1107
-  border-color: #d0d3da;
1213
+  border-color: #d0d3da;
1108 1214
 }
1109 1215
 .el-table--border::after,
1110 1216
 .el-table--group::after,
1111 1217
 .el-table::before {
1112
-  background-color: #d0d3da;
1218
+  background-color: #d0d3da;
1113 1219
 }
1114 1220
 .el-table__fixed-right {
1115
-  width: 150px;
1116
-  bottom: 20px;
1117
-  height: 100%;
1221
+  width: 150px;
1222
+  bottom: 20px;
1223
+  height: 100%;
1118 1224
 }
1119 1225
 .reviewImg {
1120
-  position: fixed;
1121
-  left: 50%;
1122
-  transform: translateX(-50%);
1123
-  top: 30%;
1226
+  position: fixed;
1227
+  left: 50%;
1228
+  transform: translateX(-50%);
1229
+  top: 30%;
1124 1230
 }
1125 1231
 </style>
1232
+