Przeglądaj źródła

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

XMLWAN 3 lat temu
rodzic
commit
a0eac388f9

+ 4 - 2
src/xt_pages/dialysis/dialysisPrintOrder.vue Wyświetl plik

@@ -728,11 +728,11 @@
728 728
           >
729 729
           </DialysisPrintOrderFive>
730 730
 
731
-          <DialysisPrintOrderSix
731
+          <DialysisPrintOrderFortySix
732 732
             v-bind:childResponse="childResponse"
733 733
             v-if="org_template_info.template_id == 6"
734 734
           >
735
-          </DialysisPrintOrderSix>
735
+          </DialysisPrintOrderFortySix>
736 736
 
737 737
           <DialysisPrintOrderSeven
738 738
             v-bind:childResponse="childResponse"
@@ -982,9 +982,11 @@ import DialysisPrintOrderFortyTwo from "./template/DialysisPrintOrderFortyTwo";
982 982
 import DialysisPrintOrderFortyThree from "./template/DialysisPrintOrderFortyThree";
983 983
 import DialysisPrintOrderFortyFour from "./template/DialysisPrintOrderFortyFour";
984 984
 import DialysisPrintOrderFortyFive from "./template/DialysisPrintOrderFortyFive";
985
+import DialysisPrintOrderFortySix from "./template/DialysisPrintOrderFortySix"
985 986
 export default {
986 987
   name: "dialysisPrintOrder",
987 988
   components: {
989
+    DialysisPrintOrderFortySix,
988 990
     DialysisPrintOrderFortyFive,
989 991
     DialysisPrintOrderFortyFour,
990 992
     DialysisPrintOrderFortyThree,

Plik diff jest za duży
+ 3728 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderFortySix.vue


+ 1 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue Wyświetl plik

@@ -357,7 +357,7 @@
357 357
                   </div>
358 358
                   <div class="row" style="padding: 2px 0;line-height:23px;display:flex;">
359 359
                     <div class="inline_block" style="flex:1;">
360
-                      透析(滤)器:
360
+                      <span>透析(滤)器:</span> 
361 361
                       <div class="under_line" style="width: 100px;text-align: center">
362 362
                         {{ prescription.dialyzer_perfusion_apparatus ? prescription.dialyzer_perfusion_apparatus : "" }}
363 363
                         {{prescription.dialysis_dialyszers?prescription.dialysis_dialyszers:"/"}}

+ 17 - 5
src/xt_pages/supply/components/addPurchaseOrder.vue Wyświetl plik

@@ -104,10 +104,10 @@
104 104
           :data="recordInfo.tableList"
105 105
           :class="signAndWeighBoxPatients"
106 106
           border
107
-          style="width: 100%"
107
+          style="width:100%"
108 108
           max-height="450"
109 109
         >
110
-          <el-table-column align="center" width="200px">
110
+          <el-table-column align="center" width="200">
111 111
             <template slot="header" slot-scope="scope">
112 112
               <span>商品<span style="color: red">*</span></span>
113 113
             </template>
@@ -118,7 +118,7 @@
118 118
               >
119 119
                 <el-select
120 120
                   v-model="scope.row.name"
121
-                  style="width: 160px"
121
+                  style="width: 160"
122 122
                   filterable
123 123
                   placeholder="请选择商品"
124 124
                   @change="changeName"
@@ -136,7 +136,7 @@
136 136
               </el-form-item>
137 137
             </template>
138 138
           </el-table-column>
139
-          <el-table-column align="center" width="150px">
139
+          <el-table-column align="center" width="150">
140 140
             <template slot="header" slot-scope="scope">
141 141
               <span>商品类别</span>
142 142
             </template>
@@ -150,7 +150,7 @@
150 150
               <div style="visibility: hidden">/</div>
151 151
             </template>
152 152
           </el-table-column>
153
-          <el-table-column label="规格&单位" align="center" width="200px">
153
+          <el-table-column label="规格&单位" align="center" width="200s">
154 154
             <template slot-scope="scope">
155 155
               <el-input
156 156
                 placeholder="规格&单位"
@@ -347,6 +347,7 @@
347 347
             style="width: 150px"
348 348
             v-model="discount_amount"
349 349
             placeholder="请输入优惠金额"
350
+            @input="count_discount"
350 351
           ></el-input
351 352
         ></span>
352 353
       </div>
@@ -838,6 +839,12 @@ export default {
838 839
       }
839 840
       this.total_price = total_price;
840 841
       return total_price.toFixed(2);
842
+    },
843
+     count_discount() {
844
+      this.rate_of_concession = (
845
+        this.discount_amount /
846
+        (this.total_price * 0.01)
847
+      ).toFixed(2);
841 848
     },
842 849
     checkPurchaseOrder(id, index) {
843 850
       this.$confirm("是否审核?", {
@@ -944,6 +951,11 @@ export default {
944 951
   transform: translateX(-50%);
945 952
   top: 30%;
946 953
 }
954
+
955
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
956
+width:10px;
957
+height:10px;
958
+}
947 959
 </style>
948 960
 
949 961
 <style>

+ 22 - 17
src/xt_pages/supply/components/addSupply.vue Wyświetl plik

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <el-dialog :title="title" :visible.sync="dialogVisible" width="35%">
2
+  <el-dialog :title="title" :visible.sync="dialogVisible" width="40%" :show-close="false">
3 3
     <!-- :before-close="handleClose" 如需要可添加进上方 -->
4 4
     <div>
5 5
       <el-form
@@ -90,7 +90,7 @@
90 90
           max-height="450"
91 91
         >
92 92
           <!-- 联系人填写 -->
93
-          <el-table-column label="联系人" align="center" width="110px">
93
+          <el-table-column label="联系人" align="center" width="130">
94 94
             <template slot="header" slot-scope="scope">
95 95
               <span>联系人<span style="color: red">*</span></span>
96 96
             </template>
@@ -112,17 +112,17 @@
112 112
               >
113 113
                 <el-input
114 114
                   v-model="scope.row.name"
115
-                  style="width: 80px; margin-top: 3px"
115
+                  style="width: 100px; margin-top: 3px"
116 116
                 ></el-input>
117 117
               </el-form-item>
118 118
             </template>
119 119
           </el-table-column>
120 120
           <!-- 手机填写 -->
121
-          <el-table-column label="手机" align="center" width="100px">
121
+          <el-table-column label="手机" align="center" width="150">
122 122
             <template slot-scope="scope">
123 123
               <el-input
124 124
                 v-model="scope.row.phone"
125
-                style="width: 80px"
125
+                style="width: 120px"
126 126
               ></el-input>
127 127
               <div style="visibility: hidden">/</div>
128 128
             </template>
@@ -130,22 +130,22 @@
130 130
           <!-- id填写======================================================= -->
131 131
           <el-table-column label="id" v-if="false">
132 132
             <template slot-scope="scope">
133
-              <el-input v-model="scope.row.id" style="width: 80px"></el-input>
133
+              <el-input v-model="scope.row.id" style="width: 100px"></el-input>
134 134
               <div style="visibility: hidden">/</div>
135 135
             </template>
136 136
           </el-table-column>
137 137
           <!-- 联系地址填写 -->
138
-          <el-table-column label="联系地址" align="center" width="130px">
138
+          <el-table-column label="联系地址" align="center" width="150">
139 139
             <template slot-scope="scope">
140 140
               <el-input
141 141
                 v-model="scope.row.address"
142
-                style="width: 115px"
142
+                style="width: 120px"
143 143
               ></el-input>
144 144
               <div style="visibility: hidden">/</div>
145 145
             </template>
146 146
           </el-table-column>
147 147
           <!-- 首要联系人填写 -->
148
-          <el-table-column align="center" width="100px">
148
+          <el-table-column align="center" width="130px">
149 149
             <template slot="header" slot-scope="scope">
150 150
               <span>首要联系人<span style="color: red">*</span></span>
151 151
             </template>
@@ -154,8 +154,7 @@
154 154
                 <!-- :prop="'contacts.' + scope.$index + '.name'"  如需添加可在上方标签加入 -->
155 155
                 <el-select
156 156
                   v-model="scope.row.is_first"
157
-                  style="width: 90px"
158
-                  placeholder="请选择"
157
+                  style="width: 110px"
159 158
                   @change="changeName($event, scope)"
160 159
                 >
161 160
                   <el-option
@@ -173,7 +172,7 @@
173 172
           <el-table-column
174 173
             label="操作"
175 174
             align="center"
176
-            width="120px"
175
+            width="150px"
177 176
             fixed="right"
178 177
           >
179 178
             <template slot-scope="scope">
@@ -184,7 +183,6 @@
184 183
                 placement="top"
185 184
               >
186 185
                 <el-button
187
-                  class="tablebtn"
188 186
                   size="mini"
189 187
                   type="primary"
190 188
                   icon="el-icon-circle-plus-outline"
@@ -199,7 +197,6 @@
199 197
                 placement="top"
200 198
               >
201 199
                 <el-button
202
-                  class="tablebtn"
203 200
                   size="mini"
204 201
                   type="danger"
205 202
                   icon="el-icon-delete"
@@ -574,8 +571,8 @@ export default {
574 571
         }
575 572
       } else if (this.show_type == 2) {
576 573
         delcontactone(params).then((res) => {
577
-          if (res.data.data.list == "删除成功") {
578
-            this.$message.success(res.data.data.list);
574
+          if (res.data.state == 1) {
575
+            this.$message.success("删除成功");
579 576
             this.getcontacts(this.supplier_ids);
580 577
           } else {
581 578
             this.$message.error(res.data.data.list);
@@ -633,7 +630,7 @@ export default {
633 630
       width: 75% !important;
634 631
     }
635 632
     .el-select.el-select--medium {
636
-      width: 70% !important;
633
+      width: 85% !important;
637 634
     }
638 635
   }
639 636
 }
@@ -658,4 +655,12 @@ export default {
658 655
 /deep/ .el-form-item__error {
659 656
   // display: none !important;
660 657
 }
658
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
659
+  width: 10px;
660
+  height: 10px;
661
+}
662
+
663
+/deep/ .el-table__fixed-right{
664
+  bottom: 0 !important;
665
+}
661 666
 </style>

+ 42 - 13
src/xt_pages/supply/components/editGoodOrder.vue Wyświetl plik

@@ -12,7 +12,7 @@
12 12
           align-items: center;
13 13
         "
14 14
       >
15
-        <div>
15
+        <div style="display: flex;">
16 16
           <span style="color: red">*</span><span>供应商:</span>
17 17
           <el-select
18 18
             v-model="supplier_name"
@@ -60,6 +60,10 @@
60 60
         </div>
61 61
         <div>
62 62
           <el-button size="small" type="primary" @click="updateGoodOrder">保存</el-button>
63
+        <div style="display: flex;" >
64
+          <el-button size="small" type="primary" @click="updateGoodOrder"
65
+            >保存</el-button
66
+          >
63 67
           <el-button
64 68
             size="small"
65 69
             type="primary"
@@ -263,6 +267,7 @@
263 267
           <el-table-column label="采购金额" align="center" width="120px">
264 268
             <template slot-scope="scope">
265 269
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
270
+              <div style="visibility: hidden">/</div>
266 271
             </template>
267 272
           </el-table-column>
268 273
           <el-table-column label="生产日期" align="center" width="200px">
@@ -273,7 +278,7 @@
273 278
               <el-form-item
274 279
                 :prop="'tableList.' + scope.$index + '.supply_product_date'"
275 280
                 :rules="tableRules.supply_product_date"
276
-                
281
+
277 282
               >
278 283
                 <el-date-picker
279 284
                   prefix-icon="el-icon-date"
@@ -391,6 +396,13 @@
391 396
           >
392 397
           </el-input>
393 398
         </div>
399
+        <!-- 审核水印 -->
400
+        <img
401
+          src="@/assets/purchase/Reviewed.png"
402
+          alt="正在加载..."
403
+          class="reviewImg"
404
+          v-show="Reviewed == true"
405
+        />
394 406
       </el-form>
395 407
       <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
396 408
       <div style="margin-top: 10px">
@@ -492,6 +504,7 @@ export default {
492 504
       page: 1,
493 505
       limit: 10,
494 506
       goodType: [],
507
+       Reviewed: false,
495 508
       goodInfo: [],
496 509
       org_id: 0,
497 510
       types: [],
@@ -543,6 +556,14 @@ export default {
543 556
       tableDataList:[],
544 557
     };
545 558
   },
559
+
560
+  watch(){
561
+      // total_price:function(newval,oldval){
562
+      //   console.log(newval,'op')
563
+      // }
564
+
565
+  },
566
+
546 567
   methods: {
547 568
     getInitOrder() {
548 569
       getInitOrder().then((response) => {
@@ -721,7 +742,7 @@ export default {
721 742
       tempObj["good_number"] = "";
722 743
       this.recordInfo.tableList.push(tempObj);
723 744
     },
724
-    handleDelete: function (index, row) { 
745
+    handleDelete: function (index, row) {
725 746
       if(this.is_check == 1){
726 747
         this.$message.error("已审核单据,不能删除!")
727 748
         return false
@@ -814,6 +835,7 @@ export default {
814 835
           this.recordInfo.tableList[i].supply_count;
815 836
       }
816 837
       this.total_price = total_price;
838
+      this.addressChange()
817 839
       return total_price.toFixed(2);
818 840
     },
819 841
        addressChange() {
@@ -867,6 +889,7 @@ export default {
867 889
             this.showTwo = true;
868 890
             this.showThree = true;
869 891
             this.disabled = true
892
+            this.Reviewed = true;
870 893
           }
871 894
 
872 895
           this.id = out.id;
@@ -932,7 +955,7 @@ export default {
932 955
           this.recordInfo.tableList = orderInfo;
933 956
           this.tableDataList = []
934 957
           this.tableDataList = orderInfo
935
-          
958
+
936 959
         }
937 960
       });
938 961
     },
@@ -973,7 +996,7 @@ export default {
973 996
             return_remake: this.return_remark,
974 997
           }
975 998
           //判断是否在采购订单数据中做了删除,如果长度相等则代表没有删除,如果不等则代表做了删除或者新增
976
-        
999
+
977 1000
           if(this.tableDataList.length != this.recordInfo.tableList){
978 1001
              warehousing_id = 0
979 1002
              for(let i=0;i<this.recordInfo.tableList.length;i++){
@@ -1154,7 +1177,7 @@ export default {
1154 1177
             }
1155 1178
 
1156 1179
             console.log("数据变了后23323233",outList)
1157
-           
1180
+
1158 1181
             let objInfo = {};
1159 1182
             if(cancelOrderList.length >0){
1160 1183
               cancelOrderList.forEach((item, index) => {
@@ -1176,15 +1199,15 @@ export default {
1176 1199
                     newArr[j].child.push(cancelOrderList[i])
1177 1200
                 }
1178 1201
               }
1179
-              
1180
-             } 
1202
+
1203
+             }
1181 1204
 
1182 1205
             for (let i = 0; i < newArr.length; i++) {
1183 1206
               for (let j = 0; j < newArr[i].child.length; j++) {
1184 1207
                 newArr[i].count += newArr[i].child[j].count;
1185 1208
               }
1186 1209
             }
1187
-           
1210
+
1188 1211
             var arr = []
1189 1212
             var total = 0;
1190 1213
             var str = "";
@@ -1204,7 +1227,7 @@ export default {
1204 1227
 
1205 1228
               if (arr.length == 0) {
1206 1229
                 this.$message.error("该订单已全部生成退库单,请知悉!");
1207
-                return 
1230
+                return
1208 1231
               }
1209 1232
               console.log("arr23323232232323",arr)
1210 1233
               if (arr.length > 0) {
@@ -1212,12 +1235,12 @@ export default {
1212 1235
                 this.$router.push({ path: "/good/return/edit?id=" + id + "&ids=" + str});
1213 1236
               }
1214 1237
              }
1215
-         
1238
+
1216 1239
           }
1217 1240
          }
1218 1241
         }
1219 1242
       });
1220
-     
1243
+
1221 1244
     },
1222 1245
     //反审核
1223 1246
     MofyGoodOrder() {
@@ -1232,7 +1255,7 @@ export default {
1232 1255
           var msg = response.data.data.msg;
1233 1256
           if (msg == 1) {
1234 1257
             this.$message.success("反审核成功!");
1235
-            return 
1258
+            return
1236 1259
           }
1237 1260
           if (msg == 2) {
1238 1261
             var cancelList = response.data.data.cancelList
@@ -1433,4 +1456,10 @@ export default {
1433 1456
   bottom: 20px;
1434 1457
   height: 100%;
1435 1458
 }
1459
+.reviewImg {
1460
+  position: fixed;
1461
+  left: 50%;
1462
+  transform: translateX(-50%);
1463
+  top: 30%;
1464
+}
1436 1465
 </style>

+ 9 - 0
src/xt_pages/supply/components/editPurchaseOrder.vue Wyświetl plik

@@ -141,6 +141,7 @@
141 141
                 style="width: 120px"
142 142
                 :disabled="true"
143 143
               ></el-input>
144
+              <div style="visibility: hidden">/</div>
144 145
             </template>
145 146
           </el-table-column>
146 147
           <el-table-column label="规格&单位" align="center" width="200px">
@@ -150,6 +151,7 @@
150 151
                 style="width: 150px"
151 152
                 :disabled="true"
152 153
               ></el-input>
154
+              <div style="visibility: hidden">/</div>
153 155
             </template>
154 156
           </el-table-column>
155 157
           <el-table-column label="单位" align="center" width="120px">
@@ -187,6 +189,7 @@
187 189
                 style="width: 100px"
188 190
                 :disabled="true"
189 191
               ></el-input>
192
+              <div style="visibility: hidden">/</div>
190 193
             </template>
191 194
           </el-table-column>
192 195
           <el-table-column label="数量" align="center" width="180px">
@@ -216,12 +219,14 @@
216 219
                 :disabled="disabled"
217 220
                 placeholder="请输入采购单价"
218 221
               ></el-input>
222
+              <div style="visibility: hidden">/</div>
219 223
             </template>
220 224
           </el-table-column>
221 225
 
222 226
           <el-table-column label="采购金额" align="center" width="120px">
223 227
             <template slot-scope="scope">
224 228
               {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
229
+              <div style="visibility: hidden">/</div>
225 230
             </template>
226 231
           </el-table-column>
227 232
 
@@ -241,6 +246,7 @@
241 246
                 >
242 247
                 </el-option>
243 248
               </el-select>
249
+              <div style="visibility: hidden">/</div>
244 250
             </template>
245 251
           </el-table-column>
246 252
 
@@ -251,6 +257,7 @@
251 257
                 style="width: 160px"
252 258
                 :disabled="true"
253 259
               ></el-input>
260
+              <div style="visibility: hidden">/</div>
254 261
             </template>
255 262
           </el-table-column>
256 263
 
@@ -262,6 +269,7 @@
262 269
                 :disabled="disabled"
263 270
                 placeholder="请输入备注"
264 271
               ></el-input>
272
+              <div style="visibility: hidden">/</div>
265 273
             </template>
266 274
           </el-table-column>
267 275
 
@@ -790,6 +798,7 @@ export default {
790 798
           this.recordInfo.tableList[i].supply_count;
791 799
       }
792 800
       this.total_price = total_price;
801
+      this.addressChange()
793 802
       return total_price.toFixed(2);
794 803
     },
795 804
 

+ 1 - 1
src/xt_pages/supply/components/editSupply.vue Wyświetl plik

@@ -918,7 +918,7 @@ background-color: #d0d3da;
918 918
 }
919 919
 .el-table__fixed-right{
920 920
   width:150px;
921
-  bottom: 20px;
921
+  /* bottom: 20px; */
922 922
   height: 100%;
923 923
 }
924 924
 </style>

+ 284 - 254
src/xt_pages/supply/purchaseOrderQuery.vue Wyświetl plik

@@ -3,49 +3,61 @@
3 3
     <div class="position">
4 4
       <bread-crumb :crumbs="crumbs"></bread-crumb>
5 5
     </div>
6
-    <div class="app-container ">
7
-      <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
6
+    <div class="app-container">
7
+      <div
8
+        style="
9
+          justify-content: space-between;
10
+          margin: 0px 0 12px 0;
11
+          display: flex;
12
+          align-items: center;
13
+        "
14
+      >
8 15
         <div>
9
-        
10 16
           <el-date-picker
11 17
             size="small"
12 18
             v-model="start_time"
13 19
             prefix-icon="el-icon-date"
14 20
             :editable="false"
15
-            style="width: 196px;"
21
+            style="width: 196px"
16 22
             type="date"
17 23
             placeholder="选择日期时间"
18 24
             align="right"
19 25
             format="yyyy-MM-dd"
20 26
             value-format="yyyy-MM-dd"
21 27
             @change="startTimeChange"
22
-           ></el-date-picker>-
23
-            <el-date-picker
24
-              size="small"
25
-              v-model="end_time"
26
-              prefix-icon="el-icon-date"
27
-              :editable="false"
28
-              style="width: 196px;"
29
-              type="date"
30
-              placeholder="选择日期时间"
31
-              align="right"
32
-              format="yyyy-MM-dd"
33
-              value-format="yyyy-MM-dd"
34
-              @change="endTimeChange"
28
+          ></el-date-picker
29
+          >-
30
+          <el-date-picker
31
+            size="small"
32
+            v-model="end_time"
33
+            prefix-icon="el-icon-date"
34
+            :editable="false"
35
+            style="width: 196px"
36
+            type="date"
37
+            placeholder="选择日期时间"
38
+            align="right"
39
+            format="yyyy-MM-dd"
40
+            value-format="yyyy-MM-dd"
41
+            @change="endTimeChange"
35 42
           ></el-date-picker>
36 43
           <span>审核状态:</span>
37
-           <el-select v-model="check_id" style="width:140px;margin-right:10px;" placeholder="请选择"
38
-            @change="changeTypeName">
44
+          <el-select
45
+            v-model="check_id"
46
+            style="width: 140px; margin-right: 10px"
47
+            placeholder="请选择"
48
+            @change="changeTypeName"
49
+          >
39 50
             <el-option
40
-                v-for="item in checkList"
41
-                :key="item.id"
42
-                :label="item.name"
43
-                :value="item.id">
51
+              v-for="item in checkList"
52
+              :key="item.id"
53
+              :label="item.name"
54
+              :value="item.id"
55
+            >
44 56
             </el-option>
45 57
           </el-select>
46 58
           <el-input
47 59
             size="small"
48
-            style="width: 200px;margin-left:10px;"
60
+            style="width: 200px; margin-left: 10px"
49 61
             class="filter-item"
50 62
             v-model.trim="keywords"
51 63
             placeholder="订单编号或供应商名称"
@@ -64,12 +76,11 @@
64 76
         </div>
65 77
       </div>
66 78
 
67
-
68
-       <el-table
79
+      <el-table
69 80
         :row-style="{ color: '#303133' }"
70 81
         :header-cell-style="{
71 82
           backgroundColor: 'rgb(245, 247, 250)',
72
-          color: '#606266'
83
+          color: '#606266',
73 84
         }"
74 85
         :data="tableList"
75 86
         :class="signAndWeighBoxPatients"
@@ -77,98 +88,99 @@
77 88
       >
78 89
         <el-table-column label="订单日期" align="center">
79 90
           <template slot-scope="scope">
80
-            <span>{{getTimes(scope.row.document_date)}}</span>
81
-         </template>
91
+            <span>{{ getTimes(scope.row.document_date) }}</span>
92
+          </template>
82 93
         </el-table-column>
83 94
         <el-table-column label="订单编号" align="center">
84 95
           <template slot-scope="scope">
85
-            <span>{{scope.row.number}}</span>
96
+            <span>{{ scope.row.number }}</span>
86 97
           </template>
87 98
         </el-table-column>
88 99
         <el-table-column label="供应商" align="center">
89
-            <template slot-scope="scope">
90
-              <span>{{getName(scope.row.supplier_id)}}</span>
91
-            </template>
92
-         </el-table-column>
93
-        <el-table-column label="关联采购单号" align="center">
94 100
           <template slot-scope="scope">
95
-            <div style="width:100%;height:100%">
96
-              <tr class="annotation-rs cluster-rs" v-for="(item,index) in scope.row.orderOut" :key="index">
101
+            <span>{{ getName(scope.row.supplier_id) }}</span>
102
+          </template>
103
+        </el-table-column>
104
+        <el-table-column label="关联采购单号" align="center" width="150">
105
+          <template slot-scope="scope">
106
+            <div style="width: 100%; height: 100%">
107
+              <tr class="color" v-for="(item,index) in scope.row.orderOut" :key="index">
97 108
                  <td>{{item.good_number}}</td>
98 109
               </tr>
110
+
99 111
             </div>
100 112
           </template>
101 113
         </el-table-column>
102 114
         <el-table-column label="采购金额" align="center">
103 115
           <template slot-scope="scope">
104
-             <span v-if="getAllBuyPrice(scope.row.orderInfo)>0">{{getAllBuyPrice(scope.row.orderInfo)}}</span> 
116
+            <span v-if="getAllBuyPrice(scope.row.orderInfo) > 0">{{
117
+              getAllBuyPrice(scope.row.orderInfo)
118
+            }}</span>
119
+          </template>
120
+        </el-table-column>
121
+
122
+        <el-table-column label="数量" align="center">
123
+          <template slot-scope="scope">
124
+            {{ getAllCount(scope.row.orderInfo) }}
125
+          </template>
126
+        </el-table-column>
127
+        <el-table-column label="订单状态" align="center">
128
+          <template slot-scope="scope">
129
+            <span v-if="scope.row.is_warehouse == 1">全部入库</span>
130
+            <span v-if="scope.row.is_warehouse == 2">未入库</span>
131
+            <span v-if="scope.row.is_warehouse == 3">部分入库</span>
105 132
           </template>
106 133
         </el-table-column>
107 134
 
108
-       <el-table-column label="数量" align="center">
109
-         <template slot-scope="scope">
110
-           {{getAllCount(scope.row.orderInfo)}}
111
-         </template>
112
-       </el-table-column>
113
-       <el-table-column label="订单状态" align="center">
114
-         <template slot-scope="scope">
115
-           <span v-if="scope.row.is_warehouse == 1">全部入库</span>
116
-           <span v-if="scope.row.is_warehouse == 2">未入库</span>
117
-           <span v-if="scope.row.is_warehouse == 3">部分入库</span>
118
-         </template>
119
-       </el-table-column>
120
-     
121 135
         <el-table-column label="交货日期" align="center">
122
-         <template slot-scope="scope">
123
-           {{getTimes(scope.row.delivery_date)}}
124
-         </template>
125
-       </el-table-column>
126
-        
127
-    
128
-      <el-table-column label="制单人" align="center">
129
-         <template slot-scope="scope">
130
-          {{getDocName(scope.row.creater)}}
131
-         </template>
132
-       </el-table-column>
136
+          <template slot-scope="scope">
137
+            {{ getTimes(scope.row.delivery_date) }}
138
+          </template>
139
+        </el-table-column>
133 140
 
134
-      <el-table-column label="审核人" align="center">
135
-         <template slot-scope="scope">
136
-          {{getDocName(scope.row.checker)}}
137
-         </template>
138
-       </el-table-column>
141
+        <el-table-column label="制单人" align="center">
142
+          <template slot-scope="scope">
143
+            {{ getDocName(scope.row.creater) }}
144
+          </template>
145
+        </el-table-column>
139 146
 
140
-       <el-table-column label="操作" align="center" width="200px">
147
+        <el-table-column label="审核人" align="center">
141 148
           <template slot-scope="scope">
142
-              <el-button
143
-                icon="el-icon-edit-outline"
144
-                size="small"
145
-                type="primary"
146
-                @click="toClick(scope.row.id)"
149
+            {{ getDocName(scope.row.checker) }}
150
+          </template>
151
+        </el-table-column>
152
+
153
+        <el-table-column label="操作" align="center" width="200px">
154
+          <template slot-scope="scope">
155
+            <el-button
156
+              icon="el-icon-edit-outline"
157
+              size="small"
158
+              type="primary"
159
+              @click="toClick(scope.row.id)"
147 160
               >编辑
148
-              </el-button>
149
-              <el-button
150
-                icon="el-icon-delete"
151
-                size="small"
152
-                type="danger"
153
-                @click="toDelete(scope.row,scope.$index)"
161
+            </el-button>
162
+            <el-button
163
+              icon="el-icon-delete"
164
+              size="small"
165
+              type="danger"
166
+              @click="toDelete(scope.row, scope.$index)"
154 167
               >删除
155
-              </el-button>
168
+            </el-button>
156 169
           </template>
157 170
         </el-table-column>
158 171
       </el-table>
159 172
       <el-pagination
160 173
         @size-change="handleSizeChange"
161 174
         @current-change="handleCurrentChange"
162
-        :page-sizes="[10, 50, 100,200,500,1000]"
175
+        :page-sizes="[10, 50, 100, 200, 500, 1000]"
163 176
         :page-size="10"
164 177
         background
165 178
         align="right"
166
-        style="margin-top:20px;"
179
+        style="margin-top: 20px"
167 180
         layout="total, sizes, prev, pager, next, jumper"
168 181
         :total="total"
169 182
       >
170 183
       </el-pagination>
171
-
172 184
     </div>
173 185
   </div>
174 186
 </template>
@@ -176,216 +188,229 @@
176 188
 <script>
177 189
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
178 190
 
179
-import {getAllSupply,getAllPurchaseOrderList,deletePurchaseOrder} from "@/api/supply"
180
-import {uParseTime } from '@/utils/tools'
191
+import {
192
+  getAllSupply,
193
+  getAllPurchaseOrderList,
194
+  deletePurchaseOrder,
195
+} from "@/api/supply";
196
+import { uParseTime } from "@/utils/tools";
181 197
 export default {
182 198
   name: "stockIn",
183
-   components: {
184
-     
185
-   },
199
+  components: {},
186 200
   components: {
187
-    BreadCrumb
201
+    BreadCrumb,
188 202
   },
189 203
   data() {
190 204
     return {
205
+      isActive: false,
206
+      aa: ["111111", "22222"],
207
+      Color_txt: true,
191 208
       crumbs: [
192 209
         { path: false, name: "采购管理" },
193
-        { path: "/supply/query", name: "采购订单" }
210
+        { path: "/supply/query", name: "采购订单" },
194 211
       ],
195 212
       keywords: "",
196 213
       total: 0,
197 214
       multipleSelection: [],
198 215
       signAndWeighBoxPatients: "sign-and-weigh-box-patients",
199 216
       start_time: "",
200
-      end_time:"",
217
+      end_time: "",
201 218
       page: 1,
202 219
       limit: 10,
203 220
       goodType: [],
204 221
       goodInfo: [],
205
-      org_id:0,
206
-      types:[],
207
-      tableList:[{}],
208
-      type_name:"",
209
-      checkList:[
210
-        {id:0,name:"请选择"},
211
-        {id:1,name:"已审核"},
212
-        {id:2,name:"未审核"},
222
+      org_id: 0,
223
+      types: [],
224
+      tableList: [{}],
225
+      type_name: "",
226
+      checkList: [
227
+        { id: 0, name: "请选择" },
228
+        { id: 1, name: "已审核" },
229
+        { id: 2, name: "未审核" },
213 230
       ],
214
-      supplyList:[],
215
-      check_id:0,
216
-      doctorList:[],
231
+      supplyList: [],
232
+      check_id: 0,
233
+      doctorList: [],
217 234
     };
218 235
   },
219
-  methods:{
220
-     toAdd(){
221
-       this.$router.push({path:"/purchase/order/add"})
222
-     },
223
-     changeTypeName(){
224
-       this.getlist()
225
-     },
226
-     startTimeChange(){
227
-      this.getlist()
228
-     },
229
-     endTimeChange(){
230
-      this.getlist()
231
-     },
232
-     search(){
233
-      this.getlist()
234
-     },
235
-     handleSizeChange(val){
236
-       this.limit = val
237
-       this.getlist()
238
-     },
239
-     handleCurrentChange(val){
240
-       this.page = val
241
-       this.getlist()
242
-     },
243
-     getAllSupply(){
244
-       getAllSupply().then(response=>{
245
-         if(response.data.state == 1){
246
-            var supplyList = response.data.data.supplyList
247
-            this.doctorList = response.data.data.doctorList
248
-            for(let i=0;i<supplyList.length;i++){
249
-              this.supplyList.push(supplyList[i])
250
-            }
251
-         }
252
-       })
253
-     },
254
-     getTimes(time) {
255
-      if (time === '') {
256
-      return ''
236
+  methods: {
237
+    toAdd() {
238
+      this.$router.push({ path: "/purchase/order/add" });
239
+    },
240
+    changeTypeName() {
241
+      this.getlist();
242
+    },
243
+    startTimeChange() {
244
+      this.getlist();
245
+    },
246
+    endTimeChange() {
247
+      this.getlist();
248
+    },
249
+    search() {
250
+      this.getlist();
251
+    },
252
+    handleSizeChange(val) {
253
+      this.limit = val;
254
+      this.getlist();
255
+    },
256
+    handleCurrentChange(val) {
257
+      this.page = val;
258
+      this.getlist();
259
+    },
260
+    getAllSupply() {
261
+      getAllSupply().then((response) => {
262
+        if (response.data.state == 1) {
263
+          var supplyList = response.data.data.supplyList;
264
+          this.doctorList = response.data.data.doctorList;
265
+          for (let i = 0; i < supplyList.length; i++) {
266
+            this.supplyList.push(supplyList[i]);
267
+          }
268
+        }
269
+      });
270
+    },
271
+    getTimes(time) {
272
+      if (time === "") {
273
+        return "";
257 274
       }
258
-      return uParseTime(time, '{y}-{m}-{d}')
259
-     },
260
-     getlist(){
261
-        var params = {
262
-          check_id:this.check_id,
263
-          start_time:this.start_time,
264
-          end_time:this.end_time,
265
-          keyword:this.keywords,
266
-          page:this.page,
267
-          limit:this.limit,
275
+      return uParseTime(time, "{y}-{m}-{d}");
276
+    },
277
+    getlist() {
278
+      console.log("hhhhhh", this.end_time);
279
+      var params = {
280
+        check_id: this.check_id,
281
+        start_time: this.start_time,
282
+        end_time: this.end_time,
283
+        keyword: this.keywords,
284
+        page: this.page,
285
+        limit: this.limit,
286
+      };
287
+      console.log("params2332232332", params);
288
+      getAllPurchaseOrderList(params).then((response) => {
289
+        if (response.data.state == 1) {
290
+          var list = response.data.data.list;
291
+          this.tableList = list;
292
+          var total = response.data.data.total;
293
+          this.total = total;
268 294
         }
269
-       console.log("params2332232332",params)
270
-       getAllPurchaseOrderList(params).then(response=>{
271
-          if(response.data.state == 1){
272
-            var list = response.data.data.list 
273
-            this.tableList = list
274
-            var total = response.data.data.total
275
-            this.total = total
276
-          }
277
-       })
278
-     },
279
-     getName(id){
280
-       var name = ""
281
-       for(let i=0;i<this.supplyList.length;i++){
282
-         if(id == this.supplyList[i].id){
283
-           name = this.supplyList[i].supplier_name
284
-         }
285
-       }
286
-       return name
287
-     },
288
-     getDocName(id){
289
-      var user_name = ""
290
-      for(let i=0;i<this.doctorList.length;i++){
291
-        if(id == this.doctorList[i].admin_user_id){
292
-          user_name = this.doctorList[i].user_name
295
+      });
296
+    },
297
+    getName(id) {
298
+      var name = "";
299
+      for (let i = 0; i < this.supplyList.length; i++) {
300
+        if (id == this.supplyList[i].id) {
301
+          name = this.supplyList[i].supplier_name;
293 302
         }
294 303
       }
295
-      return user_name
296
-     },
297
-     getAllBuyPrice(arr){
298
-       var buy_price = 0
299
-       if(arr!=undefined && arr.length > 0){
300
-          for(let i=0;i<arr.length;i++){
301
-            buy_price += (arr[i].count * arr[i].price)
302
-          }
303
-       }
304
-       return buy_price.toFixed(2)
305
-     },
306
-     getAllCount(arr){
307
-       var count = 0
308
-        if(arr!=undefined && arr.length > 0){
309
-          for(let i=0;i<arr.length;i++){
310
-            count += parseInt(arr[i].count)
311
-          }
312
-       }
313
-       if(count == 0){
314
-         return ""
315
-       }
316
-       if(count > 0){
317
-         return count
318
-       }
319
-      
320
-     },
321
-     toClick(id){
322
-       this.$router.push({path:"/purchase/order/edit?id="+id})
323
-     },
324
-     toDelete(val,index){
325
-       if(val.is_check == 1){
326
-         this.$message.error("已审核单据,不能删除!")
327
-         return false
328
-       }
329
-       if(val.orderOut.length >0 ){
330
-         this.$message.error("已关联单据,不能删除!")
331
-         return false
332
-       }
333
-       this.$confirm('确认删除吗?', '删除', {
334
-          confirmButtonText: '确 定',
335
-          cancelButtonText: '取 消',
336
-          type: 'warning'
337
-        }).then(() => {
338
-            
339
-          deletePurchaseOrder(val.id).then(response => {
304
+      return name;
305
+    },
306
+    getDocName(id) {
307
+      var user_name = "";
308
+      for (let i = 0; i < this.doctorList.length; i++) {
309
+        if (id == this.doctorList[i].admin_user_id) {
310
+          user_name = this.doctorList[i].user_name;
311
+        }
312
+      }
313
+      return user_name;
314
+    },
315
+    getAllBuyPrice(arr) {
316
+      var buy_price = 0;
317
+      if (arr != undefined && arr.length > 0) {
318
+        for (let i = 0; i < arr.length; i++) {
319
+          buy_price += arr[i].count * arr[i].price;
320
+        }
321
+      }
322
+      return buy_price.toFixed(2);
323
+    },
324
+    getAllCount(arr) {
325
+      var count = 0;
326
+      if (arr != undefined && arr.length > 0) {
327
+        for (let i = 0; i < arr.length; i++) {
328
+          count += parseInt(arr[i].count);
329
+        }
330
+      }
331
+      if (count == 0) {
332
+        return "";
333
+      }
334
+      if (count > 0) {
335
+        return count;
336
+      }
337
+    },
338
+    toClick(id) {
339
+      this.$router.push({ path: "/purchase/order/edit?id=" + id });
340
+    },
341
+    toDelete(val, index) {
342
+      if (val.is_check == 1) {
343
+        this.$message.error("已审核单据,不能删除!");
344
+        return false;
345
+      }
346
+      if (val.orderOut.length > 0) {
347
+        this.$message.error("已关联单据,不能删除!");
348
+        return false;
349
+      }
350
+      this.$confirm("确认删除吗?", "删除", {
351
+        confirmButtonText: "确 定",
352
+        cancelButtonText: "取 消",
353
+        type: "warning",
354
+      })
355
+        .then(() => {
356
+          deletePurchaseOrder(val.id).then((response) => {
340 357
             if (response.data.state == 1) {
341
-                var msg = response.data.data.msg
342
-                this.tableList.splice(index, 1);
343
-                this.$message.success("删除成功")
358
+              var msg = response.data.data.msg;
359
+              this.tableList.splice(index, 1);
360
+              this.$message.success("删除成功");
344 361
             } else {
345
-                this.$message.error("删除失败")
362
+              this.$message.error("删除失败");
346 363
             }
347
-          })
364
+          });
348 365
         })
349
-        .catch(() => {
350
-        }) 
351
-      }
366
+        .catch(() => {});
367
+    },
368
+    // 动态改变表格样式
369
+    Color_Change() {
370
+      this.Color_txt = true;
371
+      console.log(this.Color_txt, "op");
372
+    },
373
+
374
+    Color_Changeleave() {
375
+      this.Color_txt = false;
376
+      console.log(this.Color_txt, "false");
377
+    },
352 378
   },
353 379
   created() {
354
-    var now = new Date(); //当前日期 
355
-    var nowMonth = now.getMonth(); //当前月 
356
-    var nowYear = now.getFullYear(); //当前年 
380
+    var now = new Date(); //当前日期
381
+    var nowMonth = now.getMonth(); //当前月
382
+    var nowYear = now.getFullYear(); //当前年
357 383
     //本月的开始时间
358
-    var monthStartDate = new Date(nowYear, nowMonth, 1); 
359
-    this.start_time = this.getTimes(monthStartDate) 
360
-    this.end_time = this.getTimes(new Date())
361
-    this.org_id =  this.$store.getters.xt_user.org_id
362
-    this.getAllSupply()
363
-    this.getlist()
384
+    var monthStartDate = new Date(nowYear, nowMonth, 1);
385
+    this.start_time = this.getTimes(monthStartDate);
386
+    this.end_time = this.getTimes(new Date());
387
+    this.org_id = this.$store.getters.xt_user.org_id;
388
+    this.getAllSupply();
389
+    this.getlist();
364 390
   },
365
- 
366 391
 };
367 392
 </script>
368 393
 <style lang="scss">
369
-  .cluster-rs {
394
+.cluster-rs {
395
+  text-align: center;
396
+}
397
+.annotation-rs {
398
+  width: 100%;
399
+  height: 100%;
400
+  border: none;
401
+  td {
402
+    width: 155px;
403
+    padding: 5px;
404
+    border-right: none;
370 405
     text-align: center;
406
+    vertical-align: middle;
371 407
   }
372
-  .annotation-rs{
373
-    width: 100%;
374
-    height: 100%;
375
-    border: none;
376
-    td{
377
-      width: 155px;
378
-      padding: 5px;
379
-      border-right: none;
380
-      text-align: center;
381
-      vertical-align: middle;
382
-    }
383
-  }
384
-  tr:last-child{
385
-    td{
386
-      border-bottom: none;
387
-    }
408
+}
409
+tr:last-child {
410
+  td {
411
+    border-bottom: none;
388 412
   }
413
+}
389 414
 </style>
390 415
 
391 416
 <style rel="stylesheet/css" lang="scss" scoped>
@@ -439,4 +464,9 @@ export default {
439 464
   background-color: #d0d3da;
440 465
 }
441 466
 
467
+.color {
468
+  background: none !important;
469
+  display: flex;
470
+  flex-direction: column;
471
+}
442 472
 </style>

+ 2 - 1
src/xt_pages/supply/supplyQuery.vue Wyświetl plik

@@ -16,6 +16,7 @@
16 16
           <el-select
17 17
             v-model="type_name"
18 18
             style="width: 170px; margin-right: 10px"
19
+            clearable
19 20
             placeholder="请选择供应商类别"
20 21
             @change="changeTypeName"
21 22
           >
@@ -180,7 +181,7 @@ export default {
180 181
       page: 1,
181 182
       limit: 10,
182 183
 
183
-      type_name: "请选择供应商类别",
184
+      type_name: "请选择",
184 185
       crumbs: [
185 186
         { path: false, name: "采购管理" },
186 187
         { path: "/supply/good/order/query", name: "供应商管理" },