Selaa lähdekoodia

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

csx 3 vuotta sitten
vanhempi
commit
c88f92f95a

+ 4 - 3
src/xt_pages/stock/drugs/drugStockInOrder.vue Näytä tiedosto

205
             {{scope.row.warehousing_count}}{{scope.row.max_unit}}
205
             {{scope.row.warehousing_count}}{{scope.row.max_unit}}
206
           </template>
206
           </template>
207
         </el-table-column>
207
         </el-table-column>
208
-        <el-table-column label="拆零零售价" align="center">
208
+        <!-- <el-table-column label="拆零零售价" align="center">
209
           <template slot-scope="scope">
209
           <template slot-scope="scope">
210
             {{scope.row.retail_price}}
210
             {{scope.row.retail_price}}
211
           </template>
211
           </template>
212
-        </el-table-column>
212
+        </el-table-column> -->
213
         <el-table-column label="进货价" align="center">
213
         <el-table-column label="进货价" align="center">
214
           <template slot-scope="scope">
214
           <template slot-scope="scope">
215
             {{scope.row.price}}
215
             {{scope.row.price}}
217
         </el-table-column>
217
         </el-table-column>
218
         <el-table-column label="总价" align="center">
218
         <el-table-column label="总价" align="center">
219
           <template slot-scope="scope">
219
           <template slot-scope="scope">
220
-            {{scope.row.total_price}}
220
+            <!-- {{scope.row.total_price}} -->
221
+            {{(scope.row.warehousing_count * scope.row.price).toFixed(2)}}
221
           </template>
222
           </template>
222
         </el-table-column>
223
         </el-table-column>
223
         <el-table-column label="生产厂家" align="center">
224
         <el-table-column label="生产厂家" align="center">

+ 23 - 12
src/xt_pages/supply/components/addGoodOrder.vue Näytä tiedosto

472
   getGoodOrderCountList,
472
   getGoodOrderCountList,
473
   ModefySupplyWarehousing,
473
   ModefySupplyWarehousing,
474
   MofyGoodOrder,
474
   MofyGoodOrder,
475
-  getSupplyWarehouseOutById
475
+  getSupplyWarehouseOutById,
476
+  UpdateSupplyWahouseingInfo
476
 } from "@/api/supply";
477
 } from "@/api/supply";
477
 export default {
478
 export default {
478
   name: "addPurchaseOrder",
479
   name: "addPurchaseOrder",
882
       getPurchaseOrderInfo(id, ids).then((response) => {
883
       getPurchaseOrderInfo(id, ids).then((response) => {
883
         if (response.data.state == 1) {
884
         if (response.data.state == 1) {
884
           var info = response.data.data.info;
885
           var info = response.data.data.info;
885
-          
886
-         
887
-
886
+          console.log("采购订单ID")
888
           this.id = info.id;
887
           this.id = info.id;
889
           this.supplier_name = info.supplier_id;
888
           this.supplier_name = info.supplier_id;
890
           this.rate_of_concession = info.rate_of_concession;
889
           this.rate_of_concession = info.rate_of_concession;
1254
     MofyGoodOrder() {
1253
     MofyGoodOrder() {
1255
       var id = this.warese_out_id;
1254
       var id = this.warese_out_id;
1256
       console.log("采购单ID",id)
1255
       console.log("采购单ID",id)
1256
+      var warehousing_id = this.id
1257
+      console.log("采购订单ID",warehousing_id)
1257
       var params = {
1258
       var params = {
1258
         id: id,
1259
         id: id,
1260
+        warehousing_id:warehousing_id,
1259
       };
1261
       };
1260
       MofyGoodOrder(params).then((response) => {
1262
       MofyGoodOrder(params).then((response) => {
1261
         if (response.data.state == 1) {
1263
         if (response.data.state == 1) {
1265
             this.is_check = 2
1267
             this.is_check = 2
1266
             this.disabled = false
1268
             this.disabled = false
1267
             this.Reviewed = false
1269
             this.Reviewed = false
1268
-            return
1270
+           
1269
           }
1271
           }
1270
           if (msg == 2) {
1272
           if (msg == 2) {
1271
             var cancelList = response.data.data.cancelList
1273
             var cancelList = response.data.data.cancelList
1282
           var drugList = response.data.data.drugList;
1284
           var drugList = response.data.data.drugList;
1283
           console.log("druglist23323223", drugList);
1285
           console.log("druglist23323223", drugList);
1284
           var ids = "";
1286
           var ids = "";
1285
-          // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
1287
+          // 如果采购单没有数据,则代表改订单第一次生成采购订单数据,未入库
1286
           if (goodOrder.length == 0) {
1288
           if (goodOrder.length == 0) {
1287
-            this.$router.push({path: "/good/order/add?id=" + this.id + "&ids=" + ids});
1289
+             var is_warehouse = 2;
1290
+             this.ModefySupplyWarehousing(is_warehouse, this.id);
1291
+             return
1288
           }
1292
           }
1289
           for (let i = 0; i < purcaseOrder.length; i++) {
1293
           for (let i = 0; i < purcaseOrder.length; i++) {
1290
             for (let j = 0; j < drugList.length; j++) {
1294
             for (let j = 0; j < drugList.length; j++) {
1351
                   }
1355
                   }
1352
                 }
1356
                 }
1353
               }
1357
               }
1354
-              //如果total的长度等于0,怎修改该订单的状态为全部入库
1355
-
1358
+            
1359
+              console.log("arr233232233232",arr)
1360
+             if (arr.length == 0) {
1361
+                //未入库
1362
+                var is_warehouse = 2;
1363
+                this.ModefySupplyWarehousing(is_warehouse, this.id);
1364
+                
1365
+              }
1356
               if (arr.length > 0) {
1366
               if (arr.length > 0) {
1357
-                //修改采购订单的状态为全部入库
1358
-                this.UpdateSupplyWahouseingInfo();
1367
+                //部分入库
1368
+                var is_warehouse = 3;
1369
+                this.ModefySupplyWarehousing(is_warehouse, this.id);
1359
               }
1370
               }
1360
             }
1371
             }
1361
           }
1372
           }
1364
     },
1375
     },
1365
     UpdateSupplyWahouseingInfo() {
1376
     UpdateSupplyWahouseingInfo() {
1366
       var params = {
1377
       var params = {
1367
-        warehousing_id: this.$route.query.warehousing_id,
1378
+        warehousing_id: this.warehousing_id,
1368
       };
1379
       };
1369
       console.log("采购单ID",params)
1380
       console.log("采购单ID",params)
1370
       UpdateSupplyWahouseingInfo(params).then((response) => {
1381
       UpdateSupplyWahouseingInfo(params).then((response) => {

+ 62 - 14
src/xt_pages/supply/components/addGoodReturn.vue Näytä tiedosto

18
             v-model="supplier_name"
18
             v-model="supplier_name"
19
             style="width: 140px; margin-right: 10px"
19
             style="width: 140px; margin-right: 10px"
20
             placeholder="请选择"
20
             placeholder="请选择"
21
+            :disabled="disabled"
21
           >
22
           >
22
             <el-option
23
             <el-option
23
               v-for="item in supplyList"
24
               v-for="item in supplyList"
39
             align="right"
40
             align="right"
40
             format="yyyy-MM-dd"
41
             format="yyyy-MM-dd"
41
             value-format="yyyy-MM-dd"
42
             value-format="yyyy-MM-dd"
43
+            :disabled="disabled"
42
           ></el-date-picker>
44
           ></el-date-picker>
43
          
45
          
44
           <span>单据编码:{{ number }}</span>
46
           <span>单据编码:{{ number }}</span>
214
               <div style="visibility: hidden">/</div>
216
               <div style="visibility: hidden">/</div>
215
             </template>
217
             </template>
216
           </el-table-column>
218
           </el-table-column>
217
-          <el-table-column label="折扣率" align="center" width="120px">
219
+          <el-table-column label="折扣率(%)" align="center" width="120px">
218
             <template slot-scope="scope">
220
             <template slot-scope="scope">
219
-              {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
221
+               <el-input
222
+                  v-model="scope.row.deposit_rate"
223
+                  style="width: 80px"
224
+                  :disabled="disabled"
225
+                ></el-input>
220
               <div style="visibility: hidden">/</div>
226
               <div style="visibility: hidden">/</div>
221
             </template>
227
             </template>
222
           </el-table-column>
228
           </el-table-column>
223
 
229
 
224
           <el-table-column label="折扣金额" align="center" width="120px">
230
           <el-table-column label="折扣金额" align="center" width="120px">
225
             <template slot-scope="scope">
231
             <template slot-scope="scope">
226
-              {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
232
+              {{ calculate(scope.row.supply_count * scope.row.supply_price * (scope.row.deposit_rate/100)) }}
227
               <div style="visibility: hidden">/</div>
233
               <div style="visibility: hidden">/</div>
228
             </template>
234
             </template>
229
           </el-table-column>
235
           </el-table-column>
250
             </template>
256
             </template>
251
           </el-table-column>
257
           </el-table-column>
252
 
258
 
253
-          <el-table-column label="采购单号" align="center" width="200px">
259
+          <el-table-column label="关联采购单号" align="center" width="200px">
254
             <template slot-scope="scope">
260
             <template slot-scope="scope">
255
               <el-input
261
               <el-input
256
                 v-model="scope.row.good_number"
262
                 v-model="scope.row.good_number"
321
         >
327
         >
322
         </el-input>
328
         </el-input>
323
       </div>
329
       </div>
330
+       <!-- 审核水印 -->
331
+        <img
332
+          src="@/assets/purchase/Reviewed.png"
333
+          alt="正在加载..."
334
+          class="reviewImg"
335
+          v-show="Reviewed == true"
336
+        />
324
       <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
337
       <div style="margin-top: 10px">合计:{{ getAllPrice() }} 元</div>
325
       <div style="margin-top: 10px">
338
       <div style="margin-top: 10px">
326
         <span
339
         <span
329
             v-model="rate_of_concession"
342
             v-model="rate_of_concession"
330
             @input="addressChange"
343
             @input="addressChange"
331
             placeholder="请输入优惠率"
344
             placeholder="请输入优惠率"
345
+            :disabled="disabled"
332
           ></el-input
346
           ></el-input
333
           >%</span
347
           >%</span
334
         >
348
         >
339
             v-model="discount_amount"
353
             v-model="discount_amount"
340
             @input="count_discount"
354
             @input="count_discount"
341
             placeholder="请输入优惠金额"
355
             placeholder="请输入优惠金额"
356
+            :disabled="disabled"
342
           ></el-input
357
           ></el-input
343
         ></span>
358
         ></span>
344
 
359
 
345
         <span
360
         <span
346
-          >本次款:<el-input
361
+          >本次退款:<el-input
347
             style="width: 100px"
362
             style="width: 100px"
348
             v-model="payment"
363
             v-model="payment"
349
             @input="count_payment"
364
             @input="count_payment"
350
-            placeholder="请输入本次付款"
365
+            placeholder="请输入本次退款"
366
+            :disabled="disabled"
351
           ></el-input
367
           ></el-input
352
         ></span>
368
         ></span>
353
 
369
 
357
             v-model="arrearage"
373
             v-model="arrearage"
358
             @input="count_arrearage"
374
             @input="count_arrearage"
359
             placeholder="请输入本次欠款"
375
             placeholder="请输入本次欠款"
376
+            :disabled="disabled"
360
           ></el-input
377
           ></el-input
361
         ></span>
378
         ></span>
362
       </div>
379
       </div>
363
     </div>
380
     </div>
381
+    
364
   </div>
382
   </div>
365
 </template>
383
 </template>
366
 
384
 
436
       warehouse_out_id:0,
454
       warehouse_out_id:0,
437
       showThree:false,
455
       showThree:false,
438
       tableDataList:[],
456
       tableDataList:[],
457
+      Reviewed:false,
439
     };
458
     };
440
   },
459
   },
441
   watch: {
460
   watch: {
507
             drugList[i].type = 1;
526
             drugList[i].type = 1;
508
             drugList[i].supply_price = drugList[i].last_price;
527
             drugList[i].supply_price = drugList[i].last_price;
509
             drugList[i].name = drugList[i].drug_name;
528
             drugList[i].name = drugList[i].drug_name;
529
+            drugList[i].count = this.getWarehoseInfo(
530
+              drugList[i].drug_warehouse_info,
531
+              drugList[i].max_unit,
532
+              drugList[i].min_unit,
533
+              drugList[i].min_number
534
+            );
510
             drugList[i].unitList = [
535
             drugList[i].unitList = [
511
               { id: 1, name: "" },
536
               { id: 1, name: "" },
512
               { id: 2, name: "" },
537
               { id: 2, name: "" },
545
             goodList[i].supply_total = this.getTotalStockCount(
570
             goodList[i].supply_total = this.getTotalStockCount(
546
               goodList[i].good_warehouse_info
571
               goodList[i].good_warehouse_info
547
             );
572
             );
573
+            goodList[i].count = this.getTotalStockCount(
574
+              goodList[i].good_warehouse_info
575
+            );
548
             goodList[i].supply_count = "";
576
             goodList[i].supply_count = "";
549
             goodList[i].supply_total_price = "";
577
             goodList[i].supply_total_price = "";
550
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
578
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
601
           this.recordInfo.tableList[i].is_total = val.is_total;
629
           this.recordInfo.tableList[i].is_total = val.is_total;
602
           this.recordInfo.tableList[i].supply_unit = val.supply_unit;
630
           this.recordInfo.tableList[i].supply_unit = val.supply_unit;
603
           this.recordInfo.tableList[i].unitList = val.unitList;
631
           this.recordInfo.tableList[i].unitList = val.unitList;
632
+          this.recordInfo.tableList[i].count = val.count
604
         }
633
         }
605
       }
634
       }
606
     },
635
     },
631
       tempObj["warehouse_info_id"] =0
660
       tempObj["warehouse_info_id"] =0
632
       tempObj["good_number"] = ""
661
       tempObj["good_number"] = ""
633
       tempObj["min_price"] = "";
662
       tempObj["min_price"] = "";
663
+      tempObj["deposit_rate"] = ""
634
       this.recordInfo.tableList.push(tempObj);
664
       this.recordInfo.tableList.push(tempObj);
635
     },
665
     },
636
     handleDelete: function (index, row) {
666
     handleDelete: function (index, row) {
781
             orderInfo[i].supply_batch_number = orderInfo[i].supply_batch_number
811
             orderInfo[i].supply_batch_number = orderInfo[i].supply_batch_number
782
             orderInfo[i].warehousing_id = orderInfo[i].warehousing_id
812
             orderInfo[i].warehousing_id = orderInfo[i].warehousing_id
783
             orderInfo[i].warehouse_info_id = orderInfo[i].warehouse_info_id
813
             orderInfo[i].warehouse_info_id = orderInfo[i].warehouse_info_id
814
+            orderInfo[i].deposit_rate = ""
784
             if (orderInfo[i].is_source == 1) {
815
             if (orderInfo[i].is_source == 1) {
785
               for (let j = 0; j < drugList.length; j++) {
816
               for (let j = 0; j < drugList.length; j++) {
786
                 if (orderInfo[i].project_id == drugList[j].id) {
817
                 if (orderInfo[i].project_id == drugList[j].id) {
826
         if(valid){
857
         if(valid){
827
           this.loading = true
858
           this.loading = true
828
           for(let i=0;i<this.recordInfo.tableList.length;i++){
859
           for(let i=0;i<this.recordInfo.tableList.length;i++){
829
-             this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
860
+            this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count);
830
             this.recordInfo.tableList[i].supply_price =this.recordInfo.tableList[i].supply_price.toString();
861
             this.recordInfo.tableList[i].supply_price =this.recordInfo.tableList[i].supply_price.toString();
831
             this.recordInfo.tableList[i].supply_total =this.recordInfo.tableList[i].supply_total.toString();
862
             this.recordInfo.tableList[i].supply_total =this.recordInfo.tableList[i].supply_total.toString();
863
+            this.recordInfo.tableList[i].count =this.recordInfo.tableList[i].count.toString();
864
+            this.recordInfo.tableList[i].deposit_rate = this.recordInfo.tableList[i].deposit_rate.toString()
832
             if(this.recordInfo.tableList[i].supply_product_date == ""){
865
             if(this.recordInfo.tableList[i].supply_product_date == ""){
833
-              console.log("进来3323232")
834
               this.recordInfo.tableList[i].supply_product_date = 0
866
               this.recordInfo.tableList[i].supply_product_date = 0
835
             }
867
             }
836
             if(this.recordInfo.tableList[i].supply_expiry_date == ""){
868
             if(this.recordInfo.tableList[i].supply_expiry_date == ""){
882
                 this.arrearage = out.arrearage
914
                 this.arrearage = out.arrearage
883
                 this.start_time = this.getTimes(out.document_date)
915
                 this.start_time = this.getTimes(out.document_date)
884
                 var orderInfo = response.data.data.list
916
                 var orderInfo = response.data.data.list
917
+                
885
                 for(let i=0;i< orderInfo.length;i++){
918
                 for(let i=0;i< orderInfo.length;i++){
886
-                   orderInfo[i].supply_count =  orderInfo[i].count
919
+                  orderInfo[i].name = orderInfo[i].name
920
+                  orderInfo[i].id = orderInfo[i].id
921
+                  orderInfo[i].supply_count =  orderInfo[i].supply_count
887
                   orderInfo[i].supply_price =  orderInfo[i].price
922
                   orderInfo[i].supply_price =  orderInfo[i].price
888
                   orderInfo[i].supply_remake =  orderInfo[i].remark
923
                   orderInfo[i].supply_remake =  orderInfo[i].remark
889
                   orderInfo[i].type =  orderInfo[i].is_source
924
                   orderInfo[i].type =  orderInfo[i].is_source
891
                   orderInfo[i].supply_unit =  orderInfo[i].supply_unit
926
                   orderInfo[i].supply_unit =  orderInfo[i].supply_unit
892
                   orderInfo[i].order_number =  orderInfo[i].order_number
927
                   orderInfo[i].order_number =  orderInfo[i].order_number
893
                   orderInfo[i].good_number = orderInfo[i].good_number
928
                   orderInfo[i].good_number = orderInfo[i].good_number
894
-                  orderInfo[i].supply_total_price = (orderInfo[i].count * orderInfo[i].price).toFixed(2)
929
+                  orderInfo[i].supply_total_price = (orderInfo[i].supply_count * orderInfo[i].price).toFixed(2)
895
                   orderInfo[i].supply_expiry_date = this.getTimes(orderInfo[i].supply_expiry_date)
930
                   orderInfo[i].supply_expiry_date = this.getTimes(orderInfo[i].supply_expiry_date)
896
                   orderInfo[i].supply_product_date = this.getTimes(orderInfo[i].supply_product_date)
931
                   orderInfo[i].supply_product_date = this.getTimes(orderInfo[i].supply_product_date)
932
+                  orderInfo[i].deposit_rate = orderInfo[i].deposit_rate
933
+                  orderInfo[i].count = orderInfo[i].count
934
+                  orderInfo[i].supply_total = orderInfo[i].supply_total
935
+                  orderInfo[i].supply_specification_name = orderInfo[i].supply_specification_name
897
                    if(orderInfo[i].is_source == 1){
936
                    if(orderInfo[i].is_source == 1){
898
                      for(let j=0;j<this.drugList.length;j++){
937
                      for(let j=0;j<this.drugList.length;j++){
899
                         if(orderInfo[i].project_id == this.drugList[j].id){
938
                         if(orderInfo[i].project_id == this.drugList[j].id){
922
                     }
961
                     }
923
                   }
962
                   }
924
                 }
963
                 }
964
+                console.log("oredereInof2332",orderInfo)
965
+                this.recordInfo.tableList = []
966
+                this.recordInfo.tableList = orderInfo
925
              }
967
              }
926
            })
968
            })
927
           
969
           
937
             this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
979
             this.recordInfo.tableList[i].supply_count = parseInt(this.recordInfo.tableList[i].supply_count)
938
             this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
980
             this.recordInfo.tableList[i].supply_price = this.recordInfo.tableList[i].supply_price.toString()
939
             this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
981
             this.recordInfo.tableList[i].supply_total = this.recordInfo.tableList[i].supply_total.toString()
940
-            
982
+            this.recordInfo.tableList[i].count =this.recordInfo.tableList[i].count.toString();
983
+            this.recordInfo.tableList[i].deposit_rate = this.recordInfo.tableList[i].deposit_rate.toString()
941
             for(let j=0;j<this.manufactuerList.length;j++){
984
             for(let j=0;j<this.manufactuerList.length;j++){
942
                 if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
985
                 if(this.recordInfo.tableList[i].supply_manufacturer == this.manufactuerList[j].manufacturer_name){
943
                   this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
986
                   this.recordInfo.tableList[i].manufacturer_id = this.manufactuerList[j].id
974
        if(response.data.state == 1){
1017
        if(response.data.state == 1){
975
         this.loading = false
1018
         this.loading = false
976
         this.showThree = false
1019
         this.showThree = false
1020
+        this.disabled = true
977
         this.is_check = 1
1021
         this.is_check = 1
978
         var msg = response.data.data.msg
1022
         var msg = response.data.data.msg
979
-        this.$message.success("保存成功!")
1023
+        this.Reviewed = true
1024
+        this.$message.success("审核成功!")
980
        }
1025
        }
981
      })
1026
      })
982
     },
1027
     },
991
           this.loading = false;
1036
           this.loading = false;
992
           var msg = response.data.data.msg;
1037
           var msg = response.data.data.msg;
993
           this.$message.success("反审核成功!");
1038
           this.$message.success("反审核成功!");
1039
+          this.disabled = false
994
           this.is_check = 2
1040
           this.is_check = 2
1041
+          this.Reviewed = false
995
         }
1042
         }
996
       });
1043
       });
997
     },
1044
     },
1021
     tempObj["supply_expiry_date"] = ""
1068
     tempObj["supply_expiry_date"] = ""
1022
     tempObj["warehousing_id"] =0
1069
     tempObj["warehousing_id"] =0
1023
     tempObj["warehouse_info_id"] =0
1070
     tempObj["warehouse_info_id"] =0
1024
-    tempObj["count"] = 0;
1071
+    tempObj["count"] = "";
1025
     tempObj["good_number"] = ""
1072
     tempObj["good_number"] = ""
1026
     tempObj["min_price"] = "";
1073
     tempObj["min_price"] = "";
1074
+    tempObj["deposit_rate"] = ""
1027
     this.recordInfo.tableList.push(tempObj);
1075
     this.recordInfo.tableList.push(tempObj);
1028
-    console.log("即哪里地方2",this.recordInfo.tableList)
1076
+   
1029
     this.getInitOrder();
1077
     this.getInitOrder();
1030
     if(parseInt(this.$route.query.id) > 0){
1078
     if(parseInt(this.$route.query.id) > 0){
1031
 
1079
 

+ 23 - 21
src/xt_pages/supply/components/addPurchaseOrder.vue Näytä tiedosto

731
                   for (let j = 0; j < this.goodList.length; j++) {
731
                   for (let j = 0; j < this.goodList.length; j++) {
732
                     if (orderInfo[i].project_id == this.goodList[j].id) {
732
                     if (orderInfo[i].project_id == this.goodList[j].id) {
733
                       orderInfo[i].unitList = [{ id: 1, name: "" }];
733
                       orderInfo[i].unitList = [{ id: 1, name: "" }];
734
-                      orderInfo[i].unitList[0].name =
735
-                        this.goodList[j].packing_unit;
734
+                      orderInfo[i].unitList[0].name = this.goodList[j].packing_unit;
736
                     }
735
                     }
737
                   }
736
                   }
738
                 }
737
                 }
738
+                orderInfo[i].id = orderInfo[i].id
739
+                orderInfo[i].name = orderInfo[i].name
739
                 orderInfo[i].supply_count = orderInfo[i].count;
740
                 orderInfo[i].supply_count = orderInfo[i].count;
740
                 orderInfo[i].supply_price = orderInfo[i].price;
741
                 orderInfo[i].supply_price = orderInfo[i].price;
741
                 orderInfo[i].supply_remake = orderInfo[i].remark;
742
                 orderInfo[i].supply_remake = orderInfo[i].remark;
743
                 orderInfo[i].project_id = orderInfo[i].project_id;
744
                 orderInfo[i].project_id = orderInfo[i].project_id;
744
                 orderInfo[i].supply_unit = orderInfo[i].supply_unit;
745
                 orderInfo[i].supply_unit = orderInfo[i].supply_unit;
745
                 orderInfo[i].supply_specification_name = orderInfo[i].supply_specification_name
746
                 orderInfo[i].supply_specification_name = orderInfo[i].supply_specification_name
747
+                orderInfo[i].supply_total = orderInfo[i].supply_total
746
               }
748
               }
747
 
749
 
748
               this.recordInfo.tableList = orderInfo;
750
               this.recordInfo.tableList = orderInfo;
749
               console.log("orderInfo2332322323232332",orderInfo)
751
               console.log("orderInfo2332322323232332",orderInfo)
750
-              for (let i = 0; i < orderInfo.length; i++) {
751
-                // orderInfo[i].name = "";
752
-                // orderInfo[i].supply_name = "";
753
-                // orderInfo[i].supply_specification_name = "";
754
-                if (orderInfo[i].is_source == 1) {
755
-                  for (let j = 0; j < this.drugList.length; j++) {
756
-                    if (orderInfo[i].project_id == this.drugList[j].id) {
757
-                      orderInfo[i].name = this.drugList[j].drug_name;
758
-                    }
759
-                  }
760
-                }
761
-                if (orderInfo[i].is_source == 2) {
762
-                  for (let y = 0; y < this.goodList.length; y++) {
763
-                    if ((orderInfo[i].project_id = this.goodList[y].id)) {
764
-                      orderInfo[i].name = this.goodList[y].good_name;
765
-                    }
766
-                  }
767
-                }
768
-              }
752
+              // for (let i = 0; i < orderInfo.length; i++) {
753
+              //   orderInfo[i].name = "";
754
+              //   orderInfo[i].supply_name = "";
755
+              //   orderInfo[i].supply_specification_name = "";
756
+              //   if (orderInfo[i].is_source == 1) {
757
+              //     for (let j = 0; j < this.drugList.length; j++) {
758
+              //       if (orderInfo[i].project_id == this.drugList[j].id) {
759
+              //         orderInfo[i].name = this.drugList[j].drug_name;
760
+              //       }
761
+              //     }
762
+              //   }
763
+              //   if (orderInfo[i].is_source == 2) {
764
+              //     for (let y = 0; y < this.goodList.length; y++) {
765
+              //       if ((orderInfo[i].project_id = this.goodList[y].id)) {
766
+              //         orderInfo[i].name = this.goodList[y].good_name;
767
+              //       }
768
+              //     }
769
+              //   }
770
+              // }
769
               this.showTwo = false;
771
               this.showTwo = false;
770
               this.showOne = true;
772
               this.showOne = true;
771
               this.showThree = true
773
               this.showThree = true

+ 15 - 9
src/xt_pages/supply/components/editGoodOrder.vue Näytä tiedosto

951
           this.number = out.number;
951
           this.number = out.number;
952
           this.good_number = out.good_number;
952
           this.good_number = out.good_number;
953
           this.return_remark = out.return_remake;
953
           this.return_remark = out.return_remake;
954
+          
954
           this.start_time = this.getTimes(out.document_date);
955
           this.start_time = this.getTimes(out.document_date);
955
           var orderInfo = response.data.data.list;
956
           var orderInfo = response.data.data.list;
956
 
957
 
1365
             this.Reviewed = false
1366
             this.Reviewed = false
1366
             this.showOne = true
1367
             this.showOne = true
1367
             this.showTwo = false
1368
             this.showTwo = false
1368
-            return
1369
           }
1369
           }
1370
           if (msg == 2) {
1370
           if (msg == 2) {
1371
             var cancelList = response.data.data.cancelList;
1371
             var cancelList = response.data.data.cancelList;
1382
           var drugList = response.data.data.drugList;
1382
           var drugList = response.data.data.drugList;
1383
           console.log("druglist23323223", drugList);
1383
           console.log("druglist23323223", drugList);
1384
           var ids = "";
1384
           var ids = "";
1385
-          // 如果采购单没有数据,则代表改订单第一次生成采购订单数据
1385
+          // 如果采购单没有数据,则代表改订单第一次生成采购订单数据,未入库
1386
           if (goodOrder.length == 0) {
1386
           if (goodOrder.length == 0) {
1387
-            this.$router.push({
1388
-              path: "/good/order/add?id=" + id + "&ids=" + ids,
1389
-            });
1387
+              var is_warehouse = 2;
1388
+              this.ModefySupplyWarehousing(is_warehouse, this.$route.query.warehousing_id);
1389
+              return
1390
           }
1390
           }
1391
           for (let i = 0; i < purcaseOrder.length; i++) {
1391
           for (let i = 0; i < purcaseOrder.length; i++) {
1392
             for (let j = 0; j < drugList.length; j++) {
1392
             for (let j = 0; j < drugList.length; j++) {
1455
                   }
1455
                   }
1456
                 }
1456
                 }
1457
               }
1457
               }
1458
-              //如果total的长度等于0,怎修改该订单的状态为全部入库
1459
-
1458
+              //如果长度等于0,怎修改该订单的状态未入库
1459
+              console.log("arr233232233232",arr)
1460
+              if(arr.length == 0){
1461
+                var is_warehouse = 2;
1462
+                this.ModefySupplyWarehousing(is_warehouse, this.$route.query.warehousing_id);
1463
+                return
1464
+              }
1460
               if (arr.length > 0) {
1465
               if (arr.length > 0) {
1461
-                //修改采购订单的状态为全部入库
1462
-                this.UpdateSupplyWahouseingInfo();
1466
+                //修改采购订单的状态为部分入库
1467
+                var is_warehouse = 3;
1468
+                this.ModefySupplyWarehousing(is_warehouse, this.$route.query.warehousing_id);
1463
               }
1469
               }
1464
             }
1470
             }
1465
           }
1471
           }

+ 33 - 12
src/xt_pages/supply/components/editGoodReturn.vue Näytä tiedosto

18
             v-model="supplier_name"
18
             v-model="supplier_name"
19
             style="width: 140px; margin-right: 10px"
19
             style="width: 140px; margin-right: 10px"
20
             placeholder="请选择"
20
             placeholder="请选择"
21
-            @change="changeTypeName"
22
           >
21
           >
23
             <el-option
22
             <el-option
24
               v-for="item in supplyList"
23
               v-for="item in supplyList"
40
             align="right"
39
             align="right"
41
             format="yyyy-MM-dd"
40
             format="yyyy-MM-dd"
42
             value-format="yyyy-MM-dd"
41
             value-format="yyyy-MM-dd"
43
-            @change="startTimeChange"
44
           ></el-date-picker>
42
           ></el-date-picker>
45
           <!-- <span>交货日期:</span>
43
           <!-- <span>交货日期:</span>
46
         <el-date-picker
44
         <el-date-picker
232
           </el-table-column>
230
           </el-table-column>
233
           <el-table-column label="折扣率" align="center" width="120px">
231
           <el-table-column label="折扣率" align="center" width="120px">
234
             <template slot-scope="scope">
232
             <template slot-scope="scope">
235
-              {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
233
+               <el-input
234
+                  v-model="scope.row.deposit_rate"
235
+                  style="width: 80px"
236
+                  :disabled="disabled"
237
+                ></el-input>
236
               <div style="visibility: hidden">/</div>
238
               <div style="visibility: hidden">/</div>
237
             </template>
239
             </template>
238
           </el-table-column>
240
           </el-table-column>
239
 
241
 
240
-          <el-table-column label="折扣金额" align="center" width="120px">
242
+           <el-table-column label="折扣金额" align="center" width="120px">
241
             <template slot-scope="scope">
243
             <template slot-scope="scope">
242
-              {{ calculate(scope.row.supply_count * scope.row.supply_price) }}
244
+              {{ calculate(scope.row.supply_count * scope.row.supply_price * (scope.row.deposit_rate/100)) }}
243
               <div style="visibility: hidden">/</div>
245
               <div style="visibility: hidden">/</div>
244
             </template>
246
             </template>
245
           </el-table-column>
247
           </el-table-column>
246
 
248
 
249
+
247
           <el-table-column label="生产厂家" align="center" width="200px">
250
           <el-table-column label="生产厂家" align="center" width="200px">
248
             <template slot-scope="scope">
251
             <template slot-scope="scope">
249
               <el-input
252
               <el-input
266
             </template>
269
             </template>
267
           </el-table-column>
270
           </el-table-column>
268
 
271
 
269
-          <el-table-column label="采购单号" align="center" width="200px">
272
+          <el-table-column label="关联采购单号" align="center" width="200px">
270
             <template slot-scope="scope">
273
             <template slot-scope="scope">
271
               <el-input
274
               <el-input
272
                 v-model="scope.row.good_number"
275
                 v-model="scope.row.good_number"
366
         ></span>
369
         ></span>
367
 
370
 
368
         <span
371
         <span
369
-          >本次款:<el-input
372
+          >本次退款:<el-input
370
             style="width: 100px"
373
             style="width: 100px"
371
             v-model="payment"
374
             v-model="payment"
372
             @input="count_payment"
375
             @input="count_payment"
373
-            placeholder="请输入本次款"
376
+            placeholder="请输入本次退款"
374
           ></el-input
377
           ></el-input
375
         ></span>
378
         ></span>
376
 
379
 
527
               drugList[i].min_unit,
530
               drugList[i].min_unit,
528
               drugList[i].min_number
531
               drugList[i].min_number
529
             );
532
             );
533
+            drugList[i].count = this.getWarehoseInfo(
534
+              drugList[i].drug_warehouse_info,
535
+              drugList[i].max_unit,
536
+              drugList[i].min_unit,
537
+              drugList[i].min_number
538
+            );
530
             drugList[i].supply_count = "";
539
             drugList[i].supply_count = "";
531
             drugList[i].supply_total_price = "";
540
             drugList[i].supply_total_price = "";
532
             drugList[i].supply_manufacturer = drugList[i].manufacturer;
541
             drugList[i].supply_manufacturer = drugList[i].manufacturer;
573
             goodList[i].supply_total = this.getTotalStockCount(
582
             goodList[i].supply_total = this.getTotalStockCount(
574
               goodList[i].good_warehouse_info
583
               goodList[i].good_warehouse_info
575
             );
584
             );
585
+            goodList[i].count = this.getTotalStockCount(
586
+              goodList[i].good_warehouse_info
587
+            );
576
             goodList[i].supply_count = "";
588
             goodList[i].supply_count = "";
577
             goodList[i].supply_total_price = "";
589
             goodList[i].supply_total_price = "";
578
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
590
             goodList[i].supply_manufacturer = goodList[i].manufacturer;
629
           this.recordInfo.tableList[i].is_total = val.is_total;
641
           this.recordInfo.tableList[i].is_total = val.is_total;
630
           this.recordInfo.tableList[i].supply_unit = val.supply_unit;
642
           this.recordInfo.tableList[i].supply_unit = val.supply_unit;
631
           this.recordInfo.tableList[i].unitList = val.unitList;
643
           this.recordInfo.tableList[i].unitList = val.unitList;
644
+          this.recordInfo.tableList[i].count = val.count
632
         }
645
         }
633
       }
646
       }
634
     },
647
     },
662
       tempObj["count"] = "";
675
       tempObj["count"] = "";
663
       tempObj["min_price"] = "";
676
       tempObj["min_price"] = "";
664
       tempObj["good_number"] = ""
677
       tempObj["good_number"] = ""
678
+      tempObj["deposit_rate"] = ""
665
       this.recordInfo.tableList.push(tempObj);
679
       this.recordInfo.tableList.push(tempObj);
666
     },
680
     },
667
     handleDelete: function (index, row) {
681
     handleDelete: function (index, row) {
869
           var goodList = response.data.data.goodList;
883
           var goodList = response.data.data.goodList;
870
           for (let i = 0; i < orderInfo.length; i++) {
884
           for (let i = 0; i < orderInfo.length; i++) {
871
             orderInfo[i].id = orderInfo[i].id;
885
             orderInfo[i].id = orderInfo[i].id;
872
-            orderInfo[i].supply_count = orderInfo[i].count;
873
-            orderInfo[i].count = orderInfo[i].source_count;
886
+            orderInfo[i].supply_count = orderInfo[i].supply_count;
887
+            orderInfo[i].count = orderInfo[i].count;
888
+
874
             orderInfo[i].supply_price = orderInfo[i].price;
889
             orderInfo[i].supply_price = orderInfo[i].price;
875
             orderInfo[i].supply_remake = orderInfo[i].remark;
890
             orderInfo[i].supply_remake = orderInfo[i].remark;
876
             orderInfo[i].type = orderInfo[i].is_source;
891
             orderInfo[i].type = orderInfo[i].is_source;
930
               this.recordInfo.tableList[i].supply_count
945
               this.recordInfo.tableList[i].supply_count
931
             );
946
             );
932
             this.recordInfo.tableList[i].supply_price =
947
             this.recordInfo.tableList[i].supply_price =
933
-              this.recordInfo.tableList[i].supply_price.toString();
948
+            this.recordInfo.tableList[i].supply_price.toString();
934
             this.recordInfo.tableList[i].supply_total =
949
             this.recordInfo.tableList[i].supply_total =
935
-              this.recordInfo.tableList[i].supply_total.toString();
950
+            this.recordInfo.tableList[i].supply_total.toString();
951
+            this.recordInfo.tableList[i].count = this.recordInfo.tableList[i].count.toString()
952
+            this.recordInfo.tableList[i].deposit_rate = this.recordInfo.tableList[i].deposit_rate.toString()
936
             for (let j = 0; j < this.manufactuerList.length; j++) {
953
             for (let j = 0; j < this.manufactuerList.length; j++) {
937
               if (
954
               if (
938
                 this.recordInfo.tableList[i].supply_manufacturer ==
955
                 this.recordInfo.tableList[i].supply_manufacturer ==
991
            this.$message.success("审核成功!");
1008
            this.$message.success("审核成功!");
992
            this.is_check = 1
1009
            this.is_check = 1
993
            this.Reviewed = true
1010
            this.Reviewed = true
1011
+           this.disabled = true
994
           }
1012
           }
995
           if(msg == 2){
1013
           if(msg == 2){
996
             var good_name = response.data.data.good_name
1014
             var good_name = response.data.data.good_name
1024
           var msg = response.data.data.msg;
1042
           var msg = response.data.data.msg;
1025
           this.$message.success("反审核成功!");
1043
           this.$message.success("反审核成功!");
1026
           this.Reviewed = false
1044
           this.Reviewed = false
1045
+          this.disabled = false
1046
+          this.is_check = 2
1027
         }
1047
         }
1028
       });
1048
       });
1029
     },
1049
     },
1054
     tempObj["count"] = "";
1074
     tempObj["count"] = "";
1055
     tempObj["min_price"] = "";
1075
     tempObj["min_price"] = "";
1056
     tempObj["good_number"] = ""
1076
     tempObj["good_number"] = ""
1077
+    tempObj["deposit_rate"] = ""
1057
     this.recordInfo.tableList.push(tempObj);
1078
     this.recordInfo.tableList.push(tempObj);
1058
     this.getInitOrder();
1079
     this.getInitOrder();
1059
     //获取购货单列表
1080
     //获取购货单列表

+ 4 - 4
src/xt_pages/supply/goodreturn.vue Näytä tiedosto

93
               <span>{{getName(scope.row.supplier_id)}}</span>
93
               <span>{{getName(scope.row.supplier_id)}}</span>
94
             </template>
94
             </template>
95
          </el-table-column>
95
          </el-table-column>
96
-        <el-table-column label="关联购订单号" align="center" width="200">
96
+        <el-table-column label="关联购订单号" align="center" width="200">
97
           <template slot-scope="scope">
97
           <template slot-scope="scope">
98
             <span v-if="scope.row.cancelOrder!=undefined && scope.row.cancelOrder.length >0">{{scope.row.cancelOrder[0].order_number}}</span>
98
             <span v-if="scope.row.cancelOrder!=undefined && scope.row.cancelOrder.length >0">{{scope.row.cancelOrder[0].order_number}}</span>
99
           </template>
99
           </template>
100
         </el-table-column>
100
         </el-table-column>
101
-           <el-table-column label="采购单号" align="center" width="200">
101
+           <el-table-column label="关联采购单号" align="center" width="200">
102
           <template slot-scope="scope">
102
           <template slot-scope="scope">
103
              <span v-if="scope.row.cancelOrder!=undefined && scope.row.cancelOrder.length >0">{{scope.row.cancelOrder[0].good_number}}</span>
103
              <span v-if="scope.row.cancelOrder!=undefined && scope.row.cancelOrder.length >0">{{scope.row.cancelOrder[0].good_number}}</span>
104
           </template>
104
           </template>
105
         </el-table-column>
105
         </el-table-column>
106
-        <el-table-column label="购金额" align="center" width="200">
106
+        <el-table-column label="购金额" align="center" width="200">
107
           <template slot-scope="scope">
107
           <template slot-scope="scope">
108
              <span v-if="getAllBuyPrice(scope.row.cancelOrder)>0">{{getAllBuyPrice(scope.row.cancelOrder)}}</span> 
108
              <span v-if="getAllBuyPrice(scope.row.cancelOrder)>0">{{getAllBuyPrice(scope.row.cancelOrder)}}</span> 
109
           </template>
109
           </template>
124
          </template>
124
          </template>
125
        </el-table-column>
125
        </el-table-column>
126
 
126
 
127
-       <el-table-column label="款状态" align="center" width="200">
127
+       <el-table-column label="退款状态" align="center" width="200">
128
          <template slot-scope="scope">
128
          <template slot-scope="scope">
129
            <!-- <span v-if="scope.row.is_check == 2">未审核</span>
129
            <!-- <span v-if="scope.row.is_check == 2">未审核</span>
130
            <span v-if="scope.row.is_check == 1">已审核</span> -->
130
            <span v-if="scope.row.is_check == 1">已审核</span> -->